Package net.infonode.gui.hover
Class CompoundHoverListener
- java.lang.Object
-
- net.infonode.gui.hover.CompoundHoverListener
-
- All Implemented Interfaces:
HoverListener
public class CompoundHoverListener extends java.lang.Object implements HoverListener
CompoundHoverListener takes the two given hover listeners and calls the first hover listener and then the second when the mouse is hovering. When the mouse is no longer hovering, the second listener is called and then the first listener is called.
-
-
Constructor Summary
Constructors Constructor Description CompoundHoverListener(HoverListener firstListener, HoverListener secondListener)Creates a CompoundHoverListener
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HoverListenergetFirstListener()Gets the first hover listenerHoverListenergetSecondListener()Gets the second hover listenervoidmouseEntered(HoverEvent event)Called when the mouse enters the hoverable componentvoidmouseExited(HoverEvent event)Called when the mouse exits the hoverable component
-
-
-
Constructor Detail
-
CompoundHoverListener
public CompoundHoverListener(HoverListener firstListener, HoverListener secondListener)
Creates a CompoundHoverListener- Parameters:
firstListener- the first hover listenersecondListener- the second hover listener
-
-
Method Detail
-
getFirstListener
public HoverListener getFirstListener()
Gets the first hover listener- Returns:
- the hover listener
-
getSecondListener
public HoverListener getSecondListener()
Gets the second hover listener- Returns:
- the hover listener
-
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
-
-