public class SMYLDToolTipManager extends MouseAdapter implements MouseMotionListener
| Modifier and Type | Class and Description |
|---|---|
protected class |
SMYLDToolTipManager.insideTimerAction |
protected class |
SMYLDToolTipManager.outsideTimerAction |
protected class |
SMYLDToolTipManager.stillInsideTimerAction |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
heavyWeightPopupEnabled |
protected boolean |
lightWeightPopupEnabled |
| Modifier and Type | Method and Description |
|---|---|
int |
getDismissDelay()
Returns the dismissal delay value.
|
int |
getInitialDelay()
Returns the initial delay value.
|
int |
getReshowDelay()
Returns the reshow delay property.
|
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)
Called when the mouse is pressed and dragged.
|
void |
mouseEntered(MouseEvent event)
Called when the mouse enters the region of a component.
|
void |
mouseExited(MouseEvent event)
Called when the mouse exits the region of a component.
|
void |
mouseMoved(MouseEvent event)
Called when the mouse is moved.
|
void |
mousePressed(MouseEvent event)
Called when the mouse is pressed.
|
void |
registerComponent(JComponent component)
Registers a component for tooltip management.
|
void |
setDismissDelay(int milliseconds)
Specifies the dismissal 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 chooses to use a lightweight
JPanel if it fits. |
void |
setReshowDelay(int milliseconds)
Used to specify the amount of time before the user has to wait
initialDelay milliseconds before a tooltip will be shown. |
void |
setTipComponent(JComponent tipComp) |
static SMYLDToolTipManager |
sharedInstance()
Returns a shared
ToolTipManager instance. |
void |
unregisterComponent(JComponent component)
Removes a component from tooltip control.
|
mouseClicked, mouseReleased, mouseWheelMovedprotected boolean lightWeightPopupEnabled
protected boolean heavyWeightPopupEnabled
public void setEnabled(boolean flag)
flag - true to enable the tip, false otherwisepublic boolean isEnabled()
public void setLightWeightPopupEnabled(boolean aFlag)
JToolTip, the
ToolTipManager chooses to use a lightweight
JPanel if it fits. This method allows you to disable this
feature. You have to do disable it if your application mixes light weight
and heavy weights components.aFlag - true if a lightweight panel is desired, false otherwisepublic boolean isLightWeightPopupEnabled()
Tooltips are in
use, or false if heavyweight (native peer) Tooltips are
being used.ToolTips are in usepublic 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 before taking away the
tooltipgetDismissDelay()public int getDismissDelay()
setDismissDelay(int)public void setReshowDelay(int milliseconds)
initialDelay milliseconds 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 within
milliseconds milliseconds the tooltip will immediately be
shown. Otherwise, if the user moves into a region with a valid tooltip
after milliseconds milliseconds, the user will have to
wait an additional initialDelay milliseconds before the
tooltip is shown again.milliseconds - time in millisecondsgetReshowDelay()public int getReshowDelay()
setReshowDelay(int)public static SMYLDToolTipManager sharedInstance()
ToolTipManager instance.ToolTipManager objectpublic 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 object to addComponent.isFocusTraversable()public void unregisterComponent(JComponent component)
component - a JComponent object to removepublic void mouseEntered(MouseEvent event)
mouseEntered in interface MouseListenermouseEntered in class MouseAdapterevent - the event in questionpublic void mouseExited(MouseEvent event)
mouseExited in interface MouseListenermouseExited in class MouseAdapterevent - the event in questionpublic void mousePressed(MouseEvent event)
mousePressed in interface MouseListenermousePressed in class MouseAdapterevent - the event in questionpublic void mouseDragged(MouseEvent event)
mouseDragged in interface MouseMotionListenermouseDragged in class MouseAdapterevent - the event in questionpublic void mouseMoved(MouseEvent event)
mouseMoved in interface MouseMotionListenermouseMoved in class MouseAdapterevent - the event in questionpublic void setTipComponent(JComponent tipComp)
Copyright © 2019 com.github.mfjamil. All rights reserved.