Package net.infonode.tabbedpanel.hover
Class TitledTabDelayedMouseExitHoverAction
java.lang.Object
net.infonode.tabbedpanel.hover.TitledTabDelayedMouseExitHoverAction
- All Implemented Interfaces:
HoverListener
TitledTabDelayedMouseExitHoverAction is an action that wraps a HoverListener
and delays
the mouse exit when a TitledTab
is no longer hovered. The action is meant to be set
as a HoverListener
in the TitledTabProperties
.
If the TitledTab is hovered again before the delay has timed out, the timer is reset. If the TitledTab is removed before the delay has timed out the hover listener's mouseExit() will be called immediately.
- Since:
- ITP 1.3.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTitledTabDelayedMouseExitHoverAction
(int delay, HoverListener hoverListener) Creates a TitledTabDelayedMouseExitHoverAction object with the given HoverListener as action -
Method Summary
Modifier and TypeMethodDescriptionGets the hover listenerGets the TitledTabProperties object for this action.void
mouseEntered
(HoverEvent event) Called when the mouse enters the hoverable componentvoid
mouseExited
(HoverEvent event) Called when the mouse exits the hoverable component
-
Constructor Details
-
TitledTabDelayedMouseExitHoverAction
Creates a TitledTabDelayedMouseExitHoverAction object with the given HoverListener as action- Parameters:
delay
- delay in milliseconds before the hover listener is called when the titled tab is no longer hoveredhoverListener
- reference to a HoverListener
-
-
Method Details
-
getHoverListener
Gets the hover listener- Returns:
- the hoverListener.
-
getTitledTabProperties
Gets the TitledTabProperties object for this action.- Returns:
- reference to the TitledTabProperties or null if the delayed action is not a TitledTabHoverAction
-
mouseEntered
Description copied from interface:HoverListener
Called when the mouse enters the hoverable component- Specified by:
mouseEntered
in interfaceHoverListener
- Parameters:
event
- the hover event
-
mouseExited
Description copied from interface:HoverListener
Called when the mouse exits the hoverable component- Specified by:
mouseExited
in interfaceHoverListener
- Parameters:
event
- the hover event
-