|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.event.MouseAdapter | +--javax.swing.ToolTipManager
Manages all the ToolTips in the system.
JComponent.createToolTip()
Inner Class Summary | |
protected class |
ToolTipManager.insideTimerAction
|
protected class |
ToolTipManager.outsideTimerAction
|
protected class |
ToolTipManager.stillInsideTimerAction
|
Field Summary | |
protected boolean |
heavyWeightPopupEnabled
|
protected boolean |
lightWeightPopupEnabled
|
Method Summary | |
int |
getDismissDelay()
Returns the dismisal delay value. |
int |
getInitialDelay()
Returns the initial delay value. |
int |
getReshowDelay()
Returns the reshow delay value. |
boolean |
isEnabled()
Returns true if this object is enabled. |
boolean |
isLightWeightPopupEnabled()
Returns true if lightweight (all-Java) Tooltips are in use, or false if heavyweight (native peer) Tooltips are being used. |
void |
mouseDragged(MouseEvent event)
Invoked when a mouse button is pressed on a component and then dragged. |
void |
mouseEntered(MouseEvent event)
Invoked when the mouse enters a component. |
void |
mouseExited(MouseEvent event)
Invoked when the mouse exits a component. |
void |
mouseMoved(MouseEvent event)
Invoked when the mouse button has been moved on a component (with no buttons no down). |
void |
mousePressed(MouseEvent event)
Invoked when a mouse button has been pressed on a component. |
void |
registerComponent(JComponent component)
Register a component for tooltip management. |
void |
setDismissDelay(int milliseconds)
Specifies the dismisal delay value. |
void |
setEnabled(boolean flag)
Enables or disables the tooltip. |
void |
setInitialDelay(int milliseconds)
Specifies the initial delay value. |
void |
setLightWeightPopupEnabled(boolean aFlag)
When displaying the JToolTip, the ToolTipManager choose to use a light weight JPanel if it fits. |
void |
setReshowDelay(int milliseconds)
Specifies the time to delay before reshowing the tooltip. |
static ToolTipManager |
sharedInstance()
Returns a shared ToolTipManager instance. |
void |
unregisterComponent(JComponent component)
Remove a component from tooltip control. |
Methods inherited from class java.awt.event.MouseAdapter |
mouseClicked, mouseReleased |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean lightWeightPopupEnabled
protected boolean heavyWeightPopupEnabled
Method Detail |
public void setEnabled(boolean flag)
flag
- true to enable the tippublic boolean isEnabled()
public void setLightWeightPopupEnabled(boolean aFlag)
public boolean isLightWeightPopupEnabled()
public void setInitialDelay(int milliseconds)
milliseconds
- the number of milliseconds
to delay (after the cursor has paused) before displaying the
tooltipgetInitialDelay()
public int getInitialDelay()
setInitialDelay(int)
public void setDismissDelay(int milliseconds)
milliseconds
- the number of milliseconds
to delay (after the cursor has moved on) before taking away
the tooltipgetDismissDelay()
public int getDismissDelay()
setDismissDelay(int)
public void setReshowDelay(int milliseconds)
milliseconds
- the time in milliseconds
to delay before reshowing the tooltip if the cursor stops againgetReshowDelay()
public int getReshowDelay()
setReshowDelay(int)
public static ToolTipManager sharedInstance()
public void registerComponent(JComponent component)
This will register key bindings to show and hide the tooltip text
only if component
has focus bindings. This is done
so that components that are not normally focus traversable, such
as JLabel, are not made focus traversable as a result of invoking
this method.
component
- a JComponent objectJComponent.isFocusTraversable()
public void unregisterComponent(JComponent component)
component
- a JComponent objectpublic void mouseEntered(MouseEvent event)
MouseAdapter
mouseEntered
in class MouseAdapter
public void mouseExited(MouseEvent event)
MouseAdapter
mouseExited
in class MouseAdapter
public void mousePressed(MouseEvent event)
MouseAdapter
mousePressed
in class MouseAdapter
public void mouseDragged(MouseEvent event)
MouseMotionListener
mouseDragged
in interface MouseMotionListener
public void mouseMoved(MouseEvent event)
MouseMotionListener
mouseMoved
in interface MouseMotionListener
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Java, Java 2D, and JDBC are trademarks or registered trademarks of Oracle and/or its affiliates, in the US and other countries.
Copyright © 1995, 2010 Oracle and/or its affiliates. All rights reserved.