All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.awt.ToolTip

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----jp.kyasu.awt.KContainer
                           |
                           +----jp.kyasu.awt.Panel
                                   |
                                   +----jp.kyasu.awt.PopupPanel
                                           |
                                           +----jp.kyasu.awt.ToolTip

public class ToolTip
extends PopupPanel
implements ActionListener
A ToolTip object is used to display a "Tip" for a component.

Version:
12 Jun 1998
Author:
Kazuki YASUMATSU
See Also:
setToolTipText, setToolTipText, setToolTipVisual

Variable Index

 o TOOLTIP_BACKGROUND_COLOR
The background color of the tooltip.
 o TOOLTIP_DELAY
The delay milliseconds to display a tooltip.
 o TOOLTIP_FOREGROUND_COLOR
The foreground color of the tooltip.

Constructor Index

 o ToolTip(String)
Constructs a new tooltip with the specified string.
 o ToolTip(Text)
Constructs a new tooltip with the specified text object.
 o ToolTip(Visualizable)
Constructs a new tooltip with the specified visual object.
 o ToolTip(Visualizable, String)
Constructs a new tooltip with the specified visual object and string.

Method Index

 o actionPerformed(ActionEvent)
 o getToolTipText()
Return the tooltip string.
 o getToolTipVisual()
Return the visual object to display of this tooltip.
 o hidePopup()
Hides the pop-up tooltip.
 o paint(Graphics)
 o setPopupLocationHint(int, int)
Informs the hint of the location for this pop-up tooltip.
 o setToolTipText(String)
Sets the string to display of this tooltip.
 o setToolTipText(Text)
Sets the text object to display of this tooltip.
 o setToolTipVisual(Visualizable)
Sets the visual object to display of this tooltip.
 o setToolTipVisual(Visualizable, String)
Sets the visual object to display of this tooltip.
 o showPopup(Component, int, int, int)
Shows this pop-up tooltip at the x, y position relative to an origin component after the specified delay milliseconds.

Variables

 o TOOLTIP_DELAY
 public static final int TOOLTIP_DELAY
The delay milliseconds to display a tooltip.

 o TOOLTIP_FOREGROUND_COLOR
 public static final Color TOOLTIP_FOREGROUND_COLOR
The foreground color of the tooltip.

 o TOOLTIP_BACKGROUND_COLOR
 public static final Color TOOLTIP_BACKGROUND_COLOR
The background color of the tooltip.

Constructors

 o ToolTip
 public ToolTip(String string)
Constructs a new tooltip with the specified string.

Parameters:
string - the string to display of the tooltip.
 o ToolTip
 public ToolTip(Text text)
Constructs a new tooltip with the specified text object.

Parameters:
text - the text object to display of the tooltip.
 o ToolTip
 public ToolTip(Visualizable visual)
Constructs a new tooltip with the specified visual object.

Parameters:
visual - the visual object to display of the tooltip.
 o ToolTip
 public ToolTip(Visualizable visual,
                String toolTipString)
Constructs a new tooltip with the specified visual object and string.

Parameters:
visual - the visual object to display of the tooltip.
toolTipString - An additional tooltip string.

Methods

 o getToolTipText
 public String getToolTipText()
Return the tooltip string.

 o getToolTipVisual
 public Visualizable getToolTipVisual()
Return the visual object to display of this tooltip.

 o setToolTipText
 public void setToolTipText(String string)
Sets the string to display of this tooltip.

Parameters:
string - The string to display of this tooltip.
 o setToolTipText
 public void setToolTipText(Text text)
Sets the text object to display of this tooltip.

Parameters:
text - The text object to display of this tooltip.
 o setToolTipVisual
 public void setToolTipVisual(Visualizable visual)
Sets the visual object to display of this tooltip.

Parameters:
visual - The visual object to display of this tooltip.
 o setToolTipVisual
 public synchronized void setToolTipVisual(Visualizable visual,
                                           String toolTipText)
Sets the visual object to display of this tooltip.

Parameters:
visual - The visual object to display of this tooltip.
toolTipText - An additional tooltip string.
 o actionPerformed
 public void actionPerformed(ActionEvent e)
 o paint
 public void paint(Graphics g)
Overrides:
paint in class Container
 o setPopupLocationHint
 public void setPopupLocationHint(int x,
                                  int y)
Informs the hint of the location for this pop-up tooltip.

 o showPopup
 public void showPopup(Component origin,
                       int x,
                       int y,
                       int delay)
Shows this pop-up tooltip at the x, y position relative to an origin component after the specified delay milliseconds.

Parameters:
origin - the component which defines the coordinate space.
x - the x coordinate position to pop-up tooltip.
y - the y coordinate position to pop-up tooltip.
delay - the delay milliseconds.
 o hidePopup
 public void hidePopup()
Hides the pop-up tooltip.

Overrides:
hidePopup in class PopupPanel

All Packages  Class Hierarchy  This Package  Previous  Next  Index