public class ToolTipManager extends MouseAdapter implements MouseMotionListener
| Modifier and Type | Class and Description |
|---|---|
protected class |
ToolTipManager.insideTimerAction
This ActionListener is associated with the Timer that listens to whether
it is time for the JToolTip to be displayed after the mouse has entered
the JComponent.
|
protected class |
ToolTipManager.outsideTimerAction
This Actionlistener is associated with the Timer that listens to whether
the mouse cursor has re-entered the JComponent in time for an immediate
redisplay of the JToolTip.
|
protected class |
ToolTipManager.stillInsideTimerAction
This ActionListener is associated with the Timer that listens to whether
the JToolTip can be hidden after four seconds.
|
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
heavyWeightPopupEnabled
heavyWeightPopupEnabled
|
protected boolean |
lightWeightPopupEnabled
lightWeightPopupEnabled
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDismissDelay()
This method returns the time the ToolTip will be shown before being
hidden.
|
int |
getInitialDelay()
This method returns the initial delay before the ToolTip is shown when
the mouse enters a Component.
|
int |
getReshowDelay()
This method returns the amount of delay where if the mouse re-enters a
Component, the tooltip will be shown immediately.
|
boolean |
isEnabled()
This method returns whether ToolTips are enabled.
|
boolean |
isLightWeightPopupEnabled()
This method returns whether LightweightToolTips are enabled.
|
void |
mouseDragged(MouseEvent event)
This method is called when the mouse is dragged in a JComponent
registered with the ToolTipManager.
|
void |
mouseEntered(MouseEvent event)
This method is called whenever the mouse enters a JComponent registered
with the ToolTipManager.
|
void |
mouseExited(MouseEvent event)
This method is called when the mouse exits a JComponent registered with the
ToolTipManager.
|
void |
mouseMoved(MouseEvent event)
This method is called when the mouse is moved in a JComponent registered
with the ToolTipManager.
|
void |
mousePressed(MouseEvent event)
This method is called when the mouse is pressed on a JComponent
registered with the ToolTipManager.
|
void |
registerComponent(JComponent component)
This method registers a JComponent with the ToolTipManager.
|
void |
setDismissDelay(int delay)
Sets the time the ToolTip will be shown before being hidden.
|
void |
setEnabled(boolean enabled)
This method sets whether ToolTips are enabled or disabled for all
JComponents.
|
void |
setInitialDelay(int delay)
Sets the initial delay before the ToolTip is shown when the
mouse enters a Component.
|
void |
setLightWeightPopupEnabled(boolean enabled)
This method sets whether LightweightToolTips are enabled.
|
void |
setReshowDelay(int delay)
Sets the amount of delay where if the mouse re-enters a
Component, the tooltip will be shown immediately.
|
static ToolTipManager |
sharedInstance()
This method returns the shared instance of ToolTipManager used by all
JComponents.
|
void |
unregisterComponent(JComponent component)
This method unregisters a JComponent with the ToolTipManager.
|
mouseClicked, mouseReleasedprotected boolean lightWeightPopupEnabled
protected boolean heavyWeightPopupEnabled
public static ToolTipManager sharedInstance()
public void setEnabled(boolean enabled)
enabled - Whether ToolTips are enabled or disabled for all
JComponents.public boolean isEnabled()
public boolean isLightWeightPopupEnabled()
public void setLightWeightPopupEnabled(boolean enabled)
enabled - Whether LightweightToolTips will be enabled.public int getInitialDelay()
public void setInitialDelay(int delay)
delay - The initial delay before the ToolTip is shown.IllegalArgumentException - if delay is less than zero.public int getDismissDelay()
public void setDismissDelay(int delay)
delay - the delay (in milliseconds) before tool tips are hidden.IllegalArgumentException - if delay is less than zero.public int getReshowDelay()
public void setReshowDelay(int delay)
delay - The reshow delay (in milliseconds).IllegalArgumentException - if delay is less than zero.public void registerComponent(JComponent component)
component - The JComponent to register with the ToolTipManager.public void unregisterComponent(JComponent component)
component - The JComponent to unregister with the ToolTipManager.public void mouseEntered(MouseEvent event)
mouseEntered in interface MouseListenermouseEntered in class MouseAdapterevent - The MouseEvent.public void mouseExited(MouseEvent event)
mouseExited in interface MouseListenermouseExited in class MouseAdapterevent - The MouseEvent.public void mousePressed(MouseEvent event)
mousePressed in interface MouseListenermousePressed in class MouseAdapterevent - The MouseEvent.public void mouseDragged(MouseEvent event)
mouseDragged in interface MouseMotionListenerevent - The MouseEvent.public void mouseMoved(MouseEvent event)
mouseMoved in interface MouseMotionListenerevent - The MouseEvent.