Package docking
Class ToolTipManager
- java.lang.Object
-
- docking.ToolTipManager
-
public class ToolTipManager extends java.lang.ObjectA tooltip manager that simply delegates to the Swing tooltip manager. This class replaces the previous tooltip manager that overrode much of the Swing tooltip manager's functionality.
-
-
Constructor Summary
Constructors Constructor Description ToolTipManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDismissDelay()intgetInitialDelay()intgetReshowDelay()voidhideTipWindow()Hides any open tooltip windowbooleanisEnabled()booleanisLightWeightPopupEnabled()voidregisterComponent(javax.swing.JComponent component)Registers a component for tooltip management.voidsetDismissDelay(int milliseconds)Specifies the dismissal delay value.voidsetEnabled(boolean flag)Enables or disables the tooltip.voidsetInitialDelay(int milliseconds)Specifies the initial delay value.voidsetLightWeightPopupEnabled(boolean aFlag)voidsetReshowDelay(int milliseconds)Used to specify the amount of time before the user has to waitinitialDelaymilliseconds before a tooltip will be shown.static voidsetToolTipText(javax.swing.JComponent c, java.lang.String text)static ToolTipManagersharedInstance()java.lang.StringtoString()voidunregisterComponent(javax.swing.JComponent component)Removes a component from tooltip control.
-
-
-
Method Detail
-
registerComponent
public void registerComponent(javax.swing.JComponent component)
Registers a component for tooltip management.This will register key bindings to show and hide the tooltip text only if
componenthas focus bindings. This is done so that components that are not normally focus traversable, such asJLabel, are not made focus traversable as a result of invoking this method.- Parameters:
component- aJComponentobject to add- See Also:
Component.isFocusTraversable()
-
unregisterComponent
public void unregisterComponent(javax.swing.JComponent component)
Removes a component from tooltip control.- Parameters:
component- aJComponentobject to remove
-
getDismissDelay
public int getDismissDelay()
-
getReshowDelay
public int getReshowDelay()
-
isEnabled
public boolean isEnabled()
-
getInitialDelay
public int getInitialDelay()
-
isLightWeightPopupEnabled
public boolean isLightWeightPopupEnabled()
-
setLightWeightPopupEnabled
public void setLightWeightPopupEnabled(boolean aFlag)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setToolTipText
public static void setToolTipText(javax.swing.JComponent c, java.lang.String text)
-
sharedInstance
public static ToolTipManager sharedInstance()
-
setEnabled
public void setEnabled(boolean flag)
Enables or disables the tooltip.- Parameters:
flag- true to enable the tip, false otherwise
-
setInitialDelay
public void setInitialDelay(int milliseconds)
Specifies the initial delay value.- Parameters:
milliseconds- the number of milliseconds to delay (after the cursor has paused) before displaying the tooltip- See Also:
getInitialDelay()
-
setDismissDelay
public void setDismissDelay(int milliseconds)
Specifies the dismissal delay value.- Parameters:
milliseconds- the number of milliseconds to delay before taking away the tooltip- See Also:
getDismissDelay()
-
setReshowDelay
public void setReshowDelay(int milliseconds)
Used to specify the amount of time before the user has to waitinitialDelaymilliseconds before a tooltip will be shown. That is, if the tooltip is hidden, and the user moves into a region of the same Component that has a valid tooltip withinmillisecondsmilliseconds the tooltip will immediately be shown. Otherwise, if the user moves into a region with a valid tooltip aftermillisecondsmilliseconds, the user will have to wait an additionalinitialDelaymilliseconds before the tooltip is shown again.- Parameters:
milliseconds- time in milliseconds- See Also:
getReshowDelay()
-
hideTipWindow
public void hideTipWindow()
Hides any open tooltip window
-
-