kiwi.ui
Class ToolTipManager

java.lang.Object
  |
  +--kiwi.ui.ToolTipManager

public class ToolTipManager
extends Object

A tool tip manager for use with heavyweight as well as lightweight AWT and JFC components.

Version:
1.1 (11/98)
Author:
Mark Lindner, PING Software Group

Method Summary
 void addToolTip(Component c, String tip)
          Add a tool tip.
 void dispose()
          Dispose of this object.
static ToolTipManager getToolTipManager()
          Get a reference to the tool tip manager singleton.
 void removeToolTip(Component c)
          Remove a tool tip.
 void setBackground(Color bgcolor)
          Set the tool tip background color.
 void setDelay(int seconds)
          Set the tool tip display delay.
 void setFont(Font font)
          Set the tool tip font.The default font is 8 point Dialog.
 void setForeground(Color fgcolor)
          Set the tool tip foreground color.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getToolTipManager

public static ToolTipManager getToolTipManager()
Get a reference to the tool tip manager singleton.

setFont

public void setFont(Font font)
Set the tool tip font.The default font is 8 point Dialog.
Parameters:
font - The new font to use.

setBackground

public void setBackground(Color bgcolor)
Set the tool tip background color. The default background color is a light blue.
Parameters:
bgcolor - The new background color.

setForeground

public void setForeground(Color fgcolor)
Set the tool tip foreground color. The default foreground color is black.
Parameters:
fgcolor - The new foreground color.

setDelay

public void setDelay(int seconds)
              throws IllegalArgumentException
Set the tool tip display delay. A tool tip will appear seconds seconds after the mouse pointer has remained motionless within the bounds of the associated component. The default delay is 2 seconds.
Throws:
IllegalArgumentException - If seconds is not in the range 1 to 20, inclusive.

addToolTip

public void addToolTip(Component c,
                       String tip)
                throws IllegalArgumentException
Add a tool tip. Registers the component c and tool tip text tip with the tool tip manager.
See Also:
removeToolTip(java.awt.Component)

removeToolTip

public void removeToolTip(Component c)
                   throws NoSuchElementException
Remove a tool tip. Unregisters the component c from the tool tip manager.
See Also:
addToolTip(java.awt.Component, java.lang.String)

dispose

public void dispose()
Dispose of this object. Disassociates this ToolTipManager as a listener from all of the components it is managing, and releases all references to those components.