Package breitband.GUI.ui
Class Tooltip
- java.lang.Object
-
- breitband.GUI.ui.Tooltip
-
public class Tooltip extends java.lang.Object
A class for showing tooltips on screen.Tooltips are created by calling
send(String, float, float)
with a message, an x and a y coordinate- Author:
- Juno Veenstra
- See Also:
send(String, float, float)
-
-
Constructor Summary
Constructors Constructor Description Tooltip(sag.SAGPanel panel)
Constructor which creates the layer and anchors it to the top left
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear all on-screen tooltipsvoid
send(java.lang.String msg, float x, float y)
Create a new tooltip on screen.void
send(java.lang.String msg, float x, float y, sag.elements.GText.TextAnchor alignment)
Create a new tooltip on screen.
-
-
-
Method Detail
-
clear
public void clear()
Clear all on-screen tooltips
-
send
public void send(java.lang.String msg, float x, float y)
Create a new tooltip on screen.The text alignment get automatically set based on the side of the screen
- Parameters:
msg
- Message to be displayed. Can contain "\n" for line breaksx
- X coordinatey
- Y coordinate
-
send
public void send(java.lang.String msg, float x, float y, sag.elements.GText.TextAnchor alignment)
Create a new tooltip on screen.This overload allows specifying the text alignment
- Parameters:
msg
- Message to be displayed. Can contain "\n" for line breaksx
- X coordinatey
- Y coordinatealignment
- To which side to anchor the text
-
-