Package org.xhtmlrenderer.swing
Interface FSMouseListener
-
- All Known Implementing Classes:
CursorListener
,DefaultFSMouseListener
,HoverListener
,LinkListener
public interface FSMouseListener
An FSMouseListener is used to track mouse events on a subclass ofBasicPanel
. FSMouseListener instances can be added to the panel viaBasicPanel.addMouseTrackingListener(FSMouseListener)
. The listener will automatically receive callbacks as the user moves over the panel. It's the developer's responsibility to decide how to handle the events, in particular, locating the particular Box instance in the tree which should be acted upon. You may find it more useful to use one of the existing subclasses, for exampleLinkListener
,HoverListener
, orCursorListener
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onMouseDragged(BasicPanel panel, java.awt.event.MouseEvent e)
Sent when the mouse button is held and the mouse is moved.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
onMousePressed(BasicPanel panel, java.awt.event.MouseEvent e)
Sent when the mouse button is pressed.void
onMouseUp(BasicPanel panel, Box box)
Sent when the mouse button is released while hovering over a Box in the render tree.void
reset()
Implementation-dependent.
-
-
-
Method Detail
-
onMouseOver
void onMouseOver(BasicPanel panel, Box box)
Sent when the mouse moves over a Box in the render tree.- Parameters:
panel
- the panel where the box is displayedbox
- the box the mouse has just moved over
-
onMouseOut
void onMouseOut(BasicPanel panel, Box box)
Sent when the mouse leaves a Box in the render tree after entering it.- Parameters:
panel
- the panel where the box is displayedbox
- the box the mouse has just left
-
onMouseUp
void onMouseUp(BasicPanel panel, Box box)
Sent when the mouse button is released while hovering over a Box in the render tree.- Parameters:
panel
- the panel where the box is displayedbox
- the box where the mouse is currently located
-
onMousePressed
void onMousePressed(BasicPanel panel, java.awt.event.MouseEvent e)
Sent when the mouse button is pressed.- Parameters:
panel
- the panel where the box is displayede
- information about the mouse position, etc.
-
onMouseDragged
void onMouseDragged(BasicPanel panel, java.awt.event.MouseEvent e)
Sent when the mouse button is held and the mouse is moved.- Parameters:
panel
- the panel where the box is displayede
- information about the mouse position, etc.
-
reset
void reset()
Implementation-dependent. Sent viaBasicPanel.resetMouseTracker()
.
-
-