superwaba.ext.xplat.ui
Class ToolTip
java.lang.Object
|
+--waba.ui.Control
|
+--superwaba.ext.xplat.ui.ToolTip
- public class ToolTip
- extends Control
ToolTip : Allows to display a tooltip when user select control. The
control must have
been added to the container, otherwise you must call added
method so
the ToolTip can initialize itself.
----------------------------------------------
Exemple :
Button b = new Button("a button");
add(b);
b.setRect(LEFT, TOP, PREFERRED, PREFFERED);
ToolTip toolTip = new ToolTip(b, "Hi, it's a button");
You can write a multi lines tooltip using the char '|' in your message
Exemple : ToolTip tip = new ToolTip(control, "Hi! | It's Me");
----------------------------------------------
Fields inherited from class waba.ui.Control |
AFTER,
appId,
asContainer,
asWindow,
backColor,
backDis,
BEFORE,
BOTTOM,
CENTER,
enabled,
FILL,
FIT,
fm,
fmH,
focusLess,
font,
foreColor,
foreDis,
height,
LEFT,
parent,
PREFERRED,
RANGE,
RIGHT,
SAME,
TOP,
visible,
width,
x,
x2,
y,
y2 |
Method Summary |
void |
added()
|
void |
onEvent(Event e)
By the system to produce the draw the tip |
void |
setBorderColor(Color borderColor)
Set the border color for the tip. |
void |
setDelay(int millisDelay)
Delay before to display the tooltip - Default 1000 |
void |
setDisplay(int millisDisplay)
Time during which the message is diplayed - Default 2000 |
Methods inherited from class waba.ui.Control |
addTimer,
contains,
createGraphics,
getAbsoluteRect,
getBackColor,
getFont,
getFontMetrics,
getForeColor,
getNext,
getParent,
getParentWindow,
getPos,
getPreferredHeight,
getPreferredWidth,
getRect,
getSize,
isDisplayed,
isEnabled,
isVisible,
onBoundsChanged,
onColorsChanged,
onFontChanged,
onPaint,
onWindowPaintFinished,
postEvent,
removeTimer,
repaint,
repaintNow,
requestFocus,
setBackColor,
setBackForeColors,
setEnabled,
setFocusLess,
setFont,
setForeColor,
setRect,
setRect,
setRect,
setVisible |
ToolTip
public ToolTip(Control control,
String message)
- Constructor
- Parameters:
Control
- : the control which supports the tipmessage
- : the message which will be written in the tip. You can
made multiLine, using | character like a Label control.
added
public void added()
setDelay
public void setDelay(int millisDelay)
- Delay before to display the tooltip - Default 1000
- Parameters:
int
- : millisDelay - Time in milliseconds
setDisplay
public void setDisplay(int millisDisplay)
- Time during which the message is diplayed - Default 2000
- Parameters:
int
- : millisDisplay - Time in milliseconds
onEvent
public void onEvent(Event e)
- By the system to produce the draw the tip
- Overrides:
- onEvent in class Control
- Parameters:
Event
- : e
setBorderColor
public void setBorderColor(Color borderColor)
- Set the border color for the tip. By default there's no border color.