Class jrad.util.ToolTipPanel
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jrad.util.ToolTipPanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----jrad.util.ToolTipPanel

public class ToolTipPanel
extends Panel
implements Runnable
A subclass of Panel that shows Windows 95-style tool tips (little yellow help boxes) for components that have been extended to show tool tips. If tool tips should be shown for an entire frame, use the ToolTipFrame class instead of adding a ToolTipPanel to a Frame. The JRad ImageButton class implements tool tips. Examine this class if you would like to extend other components to display tool tips.

Variable Index

 o delayThread
Thread used to delay tool tip from displaying until user has lingered over component.
 o tipComponent
The component for which a tool tip is currently displayed.
 o tipFont
The font with which to display tool tips.
 o tipPopup
The yellow tool tip box.

Constructor Index

 o ToolTipPanel()
Constructs a new ToolTipPanel.

Method Index

 o hideTip(Component)
Hides the tool tip.
 o run()
Delays tool tip from displaying until user has lingered over component.
 o showTip(Component, int, int, String)
Shows a tool tip for a component.
 o updateTip(Component, int, int, String)
Updates the location of the tool tip.

Variables

 o tipPopup
  protected ToolTipPopup tipPopup
The yellow tool tip box.
 o tipFont
  protected Font tipFont
The font with which to display tool tips.
 o tipComponent
  protected Component tipComponent
The component for which a tool tip is currently displayed. Null if no tool tip is displayed.
 o delayThread
  protected Thread delayThread
Thread used to delay tool tip from displaying until user has lingered over component.

Constructors

 o ToolTipPanel
  public ToolTipPanel()
Constructs a new ToolTipPanel.

Methods

 o showTip
  public void showTip(Component component,
                      int x,
                      int y,
                      String tip)
Shows a tool tip for a component.
Parameters:
component - the component the tool tip is describing
x - the x location in the panel's coordinate plane to show the tool tip
y - the y location in the panel's coordinate plane to show the tool tip
tip - the string to display in the tool tip
 o updateTip
  public void updateTip(Component component,
                        int x,
                        int y,
                        String tip)
Updates the location of the tool tip. Called while the tool tip is delayed so that it will show up relative to the mouse location.
Parameters:
component - the component the tool tip is describing
x - the x location in the panel's coordinate plane to show the tool tip
y - the y location in the panel's coordinate plane to show the tool tip
tip - the string to display in the tool tip
 o hideTip
  public void hideTip(Component component)
Hides the tool tip.
Parameters:
component - the component the tool tip is describing
 o run
  public void run()
Delays tool tip from displaying until user has lingered over component.

All Packages  Class Hierarchy  This Package  Previous  Next  Index