Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Draw2d
3.3

org.eclipse.draw2d
Class ToolTipHelper

java.lang.Object
  extended by

org.eclipse.draw2d.PopUpHelper
      extended by
org.eclipse.draw2d.ToolTipHelper

public class ToolTipHelper
extends PopUpHelper

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, shellStyle
 
Constructor Summary
ToolTipHelper (org.eclipse.swt.widgets.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's contents to the passed tooltip, and displays the tip.
 void dispose ()
          Disposes of the tooltip's shell and kills the timer.
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 hover source's tooltip if a tooltip of another source is currently being displayed.
 
Methods inherited from class org.eclipse.draw2d. PopUpHelper
createLightweightSystem, createShell, getLightweightSystem, getShell, getShellTrimSize, 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

ToolTipHelper

public ToolTipHelper(org.eclipse.swt.widgets.Control c)
Constructs a ToolTipHelper to be associated with Control c.

Parameters:
c - the control
Since:
2.0
Method Detail

displayToolTipNear

public void displayToolTipNear(
IFigure hoverSource,
                               
IFigure tip,
                               int eventX,
                               int eventY)
Sets the LightWeightSystem's contents to the passed tooltip, and displays the tip. The tip will be displayed only if the tip source is different than the previously viewed tip source. (i.e. The cursor has moved off of the previous tooltip source figure.)

The tooltip will be painted directly below the cursor if possible, otherwise it will be painted directly above cursor.

Parameters:
hoverSource - the figure over which the hover event was fired
tip - the tooltip to be displayed
eventX - the x coordinate of the hover event
eventY - the y coordinate of the hover event
Since:
2.0

dispose

public void dispose()
Disposes of the tooltip's shell and kills the timer.

Overrides:
dispose in class PopUpHelper
See Also:
PopUpHelper.dispose()

hookShellListeners

protected void hookShellListeners()
Description copied from class: PopUpHelper
Desired popup helper behavior is achieved by writing listeners that manipulate the behavior of the PopUpHelper's Shell. Override this method and add these listeners here.

Specified by:
hookShellListeners in class PopUpHelper
See Also:
PopUpHelper.hookShellListeners()

updateToolTip

public 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.

Parameters:
figureUnderMouse - the figure over which the cursor was when called
tip - the tooltip to be displayed
eventX - the x coordinate of the cursor
eventY - the y coordinate of the cursor
Since:
2.0

Eclipse Draw2d
3.3

Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire