javax.swing
Class ToolTipManager
- EventListener, MouseListener, MouseMotionListener
This class is responsible for the registration of JToolTips to Components
and for displaying them when appropriate.
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.
|
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.
|
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
getDismissDelay
public int getDismissDelay()
This method returns the time the ToolTip will be shown before being
hidden.
- The time the ToolTip will be shown before being hidden.
getInitialDelay
public int getInitialDelay()
This method returns the initial delay before the ToolTip is shown when
the mouse enters a Component.
- The initial delay before the ToolTip is shown.
getReshowDelay
public int getReshowDelay()
This method returns the amount of delay where if the mouse re-enters a
Component, the tooltip will be shown immediately.
isEnabled
public boolean isEnabled()
This method returns whether ToolTips are enabled.
- Whether ToolTips are enabled.
isLightWeightPopupEnabled
public boolean isLightWeightPopupEnabled()
This method returns whether LightweightToolTips are enabled.
- Whether LighweightToolTips are enabled.
mouseEntered
public void mouseEntered(MouseEvent event)
This method is called whenever the mouse enters a JComponent registered
with the ToolTipManager. When the mouse enters within the period of time
specified by the reshow delay, the tooltip will be displayed
immediately. Otherwise, it must wait for the initial delay before
displaying the tooltip.
- mouseEntered in interface MouseListener
- mouseEntered in interface MouseAdapter
registerComponent
public void registerComponent(JComponent component)
This method registers a JComponent with the ToolTipManager.
component
- The JComponent to register with the ToolTipManager.
setDismissDelay
public void setDismissDelay(int delay)
Sets the time the ToolTip will be shown before being hidden.
delay
- the delay (in milliseconds) before tool tips are hidden.
setEnabled
public void setEnabled(boolean enabled)
This method sets whether ToolTips are enabled or disabled for all
JComponents.
enabled
- Whether ToolTips are enabled or disabled for all
JComponents.
setInitialDelay
public void setInitialDelay(int delay)
Sets the initial delay before the ToolTip is shown when the
mouse enters a Component.
delay
- The initial delay before the ToolTip is shown.
setLightWeightPopupEnabled
public void setLightWeightPopupEnabled(boolean enabled)
This method sets whether LightweightToolTips are enabled. If you mix
Lightweight and Heavyweight components, you must set this to false to
ensure that the ToolTips popup above all other components.
enabled
- Whether LightweightToolTips will be enabled.
setReshowDelay
public void setReshowDelay(int delay)
Sets the amount of delay where if the mouse re-enters a
Component, the tooltip will be shown immediately.
delay
- The reshow delay (in milliseconds).
sharedInstance
public static ToolTipManager sharedInstance()
This method returns the shared instance of ToolTipManager used by all
JComponents.
- The shared instance of ToolTipManager.
unregisterComponent
public void unregisterComponent(JComponent component)
This method unregisters a JComponent with the ToolTipManager.
component
- The JComponent to unregister with the ToolTipManager.
ToolTipManager.java --
Copyright (C) 2002, 2004, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.