Package net.infonode.tabbedpanel.hover
Class TitledTabDelayedMouseExitHoverAction
- java.lang.Object
-
- net.infonode.tabbedpanel.hover.TitledTabDelayedMouseExitHoverAction
-
- All Implemented Interfaces:
HoverListener
public class TitledTabDelayedMouseExitHoverAction extends java.lang.Object implements HoverListener
TitledTabDelayedMouseExitHoverAction is an action that wraps a
HoverListenerand delays the mouse exit when aTitledTabis no longer hovered. The action is meant to be set as aHoverListenerin theTitledTabProperties.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:
TitledTab,TitledTabProperties
-
-
Constructor Summary
Constructors Constructor Description TitledTabDelayedMouseExitHoverAction(int delay, HoverListener hoverListener)Creates a TitledTabDelayedMouseExitHoverAction object with the given HoverListener as action
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HoverListenergetHoverListener()Gets the hover listenerTitledTabPropertiesgetTitledTabProperties()Gets the TitledTabProperties object for this action.voidmouseEntered(HoverEvent event)Called when the mouse enters the hoverable componentvoidmouseExited(HoverEvent event)Called when the mouse exits the hoverable component
-
-
-
Constructor Detail
-
TitledTabDelayedMouseExitHoverAction
public TitledTabDelayedMouseExitHoverAction(int delay, HoverListener hoverListener)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 Detail
-
getHoverListener
public HoverListener getHoverListener()
Gets the hover listener- Returns:
- the hoverListener.
-
getTitledTabProperties
public TitledTabProperties getTitledTabProperties()
Gets the TitledTabProperties object for this action.- Returns:
- reference to the TitledTabProperties or null if the delayed action is not a TitledTabHoverAction
-
mouseEntered
public void mouseEntered(HoverEvent event)
Description copied from interface:HoverListenerCalled when the mouse enters the hoverable component- Specified by:
mouseEnteredin interfaceHoverListener- Parameters:
event- the hover event
-
mouseExited
public void mouseExited(HoverEvent event)
Description copied from interface:HoverListenerCalled when the mouse exits the hoverable component- Specified by:
mouseExitedin interfaceHoverListener- Parameters:
event- the hover event
-
-