|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.draw2d.PopUpHelper | +--org.eclipse.draw2d.ToolTipHelper
This class is used by SWTEventDispatcher as support to display Figure tooltips on a mouse hover event. Tooltips are drawn directly below the cursor unless the display does not allow, in which case the tooltip will be drawn directly above the cursor. Tooltips will be displayed with a LineBorder. The background of the tooltips will be the standard SWT tooltipBackground color unless the Figure's tooltip has set its own background.
Field Summary |
Fields inherited from class org.eclipse.draw2d.PopUpHelper |
control |
Constructor Summary | |
ToolTipHelper(Control c)
Constructs a ToolTipHelper to be associated with Control c. |
Method Summary | |
void |
displayToolTipNear(IFigure hoverSource,
IFigure tip,
int eventX,
int eventY)
Sets the LightWeightSystem object's contents to the passed tooltip, and displays the tip. |
void |
dispose()
Dispose of this PopUpHelper object. |
protected void |
hookShellListeners()
Desired popup helper behavior is achieved by writing listeners that manipulate the behavior of the PopUpHelper's Shell. |
void |
updateToolTip(IFigure figureUnderMouse,
IFigure tip,
int eventX,
int eventY)
Displays the hoverSource's tooltip if a tooltip of another source is currently being displayed. |
Methods inherited from class org.eclipse.draw2d.PopUpHelper |
createLightweightSystem, createShell, getLightweightSystem, getShell, hide, isShowing, setBackgroundColor, setForegroundColor, setShellBounds, show |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ToolTipHelper(Control c)
Method Detail |
public void displayToolTipNear(IFigure hoverSource, IFigure tip, int eventX, int eventY)
hoverSource
- The Figure overwhich the hover event was fired.tip
- The tool tip to be displayed.eventX
- X coordinate of the hover eventeventY
- Y coordinate of the hover eventpublic void dispose()
PopUpHelper
dispose
in class PopUpHelper
protected void hookShellListeners()
PopUpHelper
hookShellListeners
in class PopUpHelper
public void updateToolTip(IFigure figureUnderMouse, IFigure tip, int eventX, int eventY)
figureUnderMouse
- The Figure overwhich the cursor was when calledtip
- The tool tip to be displayed.eventX
- X coordinate of the cursoreventY
- Y coordinate of the cursor
|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |