Package org.xhtmlrenderer.swing
Class HoverListener
- java.lang.Object
-
- org.xhtmlrenderer.swing.DefaultFSMouseListener
-
- org.xhtmlrenderer.swing.HoverListener
-
- All Implemented Interfaces:
FSMouseListener
public class HoverListener extends DefaultFSMouseListener
A HoverListener is used to respond to a mouse hovering over a Box in aBasicPanel
. In particular, it applies any :hover selectors that apply to the Box in question, and resets those styles as the mouse exits the Box.
-
-
Constructor Summary
Constructors Constructor Description HoverListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onMouseOut(BasicPanel panel, Box box)
Sent when the mouse leaves a Box in the render tree after entering it.void
onMouseOver(BasicPanel panel, Box box)
Sent when the mouse moves over a Box in the render tree.void
reset()
Resets the tracking information related to the currently hovered element.-
Methods inherited from class org.xhtmlrenderer.swing.DefaultFSMouseListener
onMouseDragged, onMousePressed, onMouseUp
-
-
-
-
Method Detail
-
onMouseOut
public void onMouseOut(BasicPanel panel, Box box)
Sent when the mouse leaves a Box in the render tree after entering it.- Specified by:
onMouseOut
in interfaceFSMouseListener
- Overrides:
onMouseOut
in classDefaultFSMouseListener
- Parameters:
panel
- the panel where the box is displayedbox
- the box the mouse has just left
-
onMouseOver
public void onMouseOver(BasicPanel panel, Box box)
Sent when the mouse moves over a Box in the render tree.- Specified by:
onMouseOver
in interfaceFSMouseListener
- Overrides:
onMouseOver
in classDefaultFSMouseListener
- Parameters:
panel
- the panel where the box is displayedbox
- the box the mouse has just moved over
-
reset
public void reset()
Resets the tracking information related to the currently hovered element.- Specified by:
reset
in interfaceFSMouseListener
- Overrides:
reset
in classDefaultFSMouseListener
-
-