public class ToolTipHelper extends PopUpHelper
control, shellStyle
Constructor and Description |
---|
ToolTipHelper(Control c)
Constructs a ToolTipHelper to be associated with Control c.
|
Modifier and Type | Method and Description |
---|---|
void |
displayToolTipNear(IFigure hoverSource,
IFigure tip,
int eventX,
int eventY)
Sets the LightWeightSystem's contents to the passed tooltip, and displays
the tip.
|
void |
dispose()
Disposes of the tooltip's shell and kills the timer.
|
protected void |
hide()
Hides this PopUpHelper's Shell.
|
protected void |
hookShellListeners()
Desired popup helper behavior is achieved by writing listeners that
manipulate the behavior of the PopUpHelper's Shell.
|
void |
setHideDelay(int hideDelay)
Sets the tooltip hide delay, which is the amount in ms, after which the
tooltip will disappear again.
|
void |
updateToolTip(IFigure figureUnderMouse,
IFigure tip,
int eventX,
int eventY)
Displays the hover source's tooltip if a tooltip of another source is
currently being displayed.
|
createLightweightSystem, createShell, getLightweightSystem, getShell, getShellTrimSize, isShowing, setBackgroundColor, setForegroundColor, setShellBounds, show
public ToolTipHelper(Control c)
c
- the controlpublic void setHideDelay(int hideDelay)
hideDelay
- The delay after which the tooltip is hidden again, in ms.public void displayToolTipNear(IFigure hoverSource, IFigure tip, int eventX, int eventY)
The tooltip will be painted directly below the cursor if possible, otherwise it will be painted directly above cursor.
hoverSource
- the figure over which the hover event was firedtip
- the tooltip to be displayedeventX
- the x coordinate of the hover eventeventY
- the y coordinate of the hover eventpublic void dispose()
dispose
in class PopUpHelper
PopUpHelper.dispose()
protected void hide()
PopUpHelper
hide
in class PopUpHelper
protected void hookShellListeners()
PopUpHelper
hookShellListeners
in class PopUpHelper
PopUpHelper.hookShellListeners()
public void updateToolTip(IFigure figureUnderMouse, IFigure tip, int eventX, int eventY)
figureUnderMouse
- the figure over which the cursor was when calledtip
- the tooltip to be displayedeventX
- the x coordinate of the cursoreventY
- the y coordinate of the cursorCopyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.