org.xhtmlrenderer.swing
Class LinkListener
java.lang.Object
org.xhtmlrenderer.swing.DefaultFSMouseListener
org.xhtmlrenderer.swing.LinkListener
- All Implemented Interfaces:
- FSMouseListener
public class LinkListener
- extends DefaultFSMouseListener
A LinkListener is used to respond to a user clicking Box elements in a BasicPanel
,
in particular to handle anchors and navigation. When a Box is clicked, if it has an anchor associated with it, the
panel will be requested to navigate to that URI.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LinkListener
public LinkListener()
linkClicked
public void linkClicked(BasicPanel panel,
java.lang.String uri)
- Utility method to request the panel navigate to the given URI.
- Parameters:
panel
- the panel on which the listener is attacheduri
- the URI to navigate to
onMouseUp
public void onMouseUp(BasicPanel panel,
Box box)
- Triggers the click on a box. If the Box's element has an associated URI (e.g. is an anchor), notifies the
panel to navigate to that URI.
- Specified by:
onMouseUp
in interface FSMouseListener
- Overrides:
onMouseUp
in class DefaultFSMouseListener
- Parameters:
panel
- the panel where the mouse button has been released.box
- the box on which the mouse cursor is currently located
Flying Saucer Project Home