javax.swing.text.html
Class HTMLEditorKit.LinkController

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.awt.event.MouseAdapter sample code for java.awt.event.MouseAdapter definition code for java.awt.event.MouseAdapter 
      extended by javax.swing.text.html.HTMLEditorKit.LinkController
All Implemented Interfaces:
MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener , MouseMotionListener sample code for java.awt.event.MouseMotionListener definition code for java.awt.event.MouseMotionListener , Serializable sample code for java.io.Serializable definition code for java.io.Serializable , EventListener sample code for java.util.EventListener definition code for java.util.EventListener
Enclosing class:
HTMLEditorKit sample code for javax.swing.text.html.HTMLEditorKit definition code for javax.swing.text.html.HTMLEditorKit

public static class HTMLEditorKit.LinkController
extends MouseAdapter sample code for java.awt.event.MouseAdapter definition code for java.awt.event.MouseAdapter
implements MouseMotionListener sample code for java.awt.event.MouseMotionListener definition code for java.awt.event.MouseMotionListener , Serializable sample code for java.io.Serializable definition code for java.io.Serializable

Class to watch the associated component and fire hyperlink events on it when appropriate.

See Also:
Serialized Form

Constructor Summary
HTMLEditorKit.LinkController sample code for javax.swing.text.html.HTMLEditorKit.LinkController.HTMLEditorKit.LinkController() definition code for javax.swing.text.html.HTMLEditorKit.LinkController.HTMLEditorKit.LinkController() ()
           
 
Method Summary
protected  void activateLink sample code for javax.swing.text.html.HTMLEditorKit.LinkController.activateLink(int, javax.swing.JEditorPane) definition code for javax.swing.text.html.HTMLEditorKit.LinkController.activateLink(int, javax.swing.JEditorPane) (int pos, JEditorPane sample code for javax.swing.JEditorPane definition code for javax.swing.JEditorPane  editor)
          Calls linkActivated on the associated JEditorPane if the given position represents a link.
 void mouseClicked sample code for javax.swing.text.html.HTMLEditorKit.LinkController.mouseClicked(java.awt.event.MouseEvent) definition code for javax.swing.text.html.HTMLEditorKit.LinkController.mouseClicked(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Called for a mouse click event.
 void mouseDragged sample code for javax.swing.text.html.HTMLEditorKit.LinkController.mouseDragged(java.awt.event.MouseEvent) definition code for javax.swing.text.html.HTMLEditorKit.LinkController.mouseDragged(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Invoked when a mouse button is pressed on a component and then dragged.
 void mouseMoved sample code for javax.swing.text.html.HTMLEditorKit.LinkController.mouseMoved(java.awt.event.MouseEvent) definition code for javax.swing.text.html.HTMLEditorKit.LinkController.mouseMoved(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.
 
Methods inherited from class java.awt.event.MouseAdapter sample code for java.awt.event.MouseAdapter definition code for java.awt.event.MouseAdapter
mouseEntered sample code for java.awt.event.MouseAdapter.mouseEntered(java.awt.event.MouseEvent) definition code for java.awt.event.MouseAdapter.mouseEntered(java.awt.event.MouseEvent) , mouseExited sample code for java.awt.event.MouseAdapter.mouseExited(java.awt.event.MouseEvent) definition code for java.awt.event.MouseAdapter.mouseExited(java.awt.event.MouseEvent) , mousePressed sample code for java.awt.event.MouseAdapter.mousePressed(java.awt.event.MouseEvent) definition code for java.awt.event.MouseAdapter.mousePressed(java.awt.event.MouseEvent) , mouseReleased sample code for java.awt.event.MouseAdapter.mouseReleased(java.awt.event.MouseEvent) definition code for java.awt.event.MouseAdapter.mouseReleased(java.awt.event.MouseEvent)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

HTMLEditorKit.LinkController sample code for javax.swing.text.html.HTMLEditorKit.LinkController() definition code for javax.swing.text.html.HTMLEditorKit.LinkController()

public HTMLEditorKit.LinkController()
Method Detail

mouseClicked sample code for javax.swing.text.html.HTMLEditorKit.LinkController.mouseClicked(java.awt.event.MouseEvent) definition code for javax.swing.text.html.HTMLEditorKit.LinkController.mouseClicked(java.awt.event.MouseEvent)

public void mouseClicked(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Called for a mouse click event. If the component is read-only (ie a browser) then the clicked event is used to drive an attempt to follow the reference specified by a link.

Specified by:
mouseClicked sample code for java.awt.event.MouseListener.mouseClicked(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mouseClicked(java.awt.event.MouseEvent) in interface MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener
Overrides:
mouseClicked sample code for java.awt.event.MouseAdapter.mouseClicked(java.awt.event.MouseEvent) definition code for java.awt.event.MouseAdapter.mouseClicked(java.awt.event.MouseEvent) in class MouseAdapter sample code for java.awt.event.MouseAdapter definition code for java.awt.event.MouseAdapter
Parameters:
e - the mouse event
See Also:
MouseListener.mouseClicked(java.awt.event.MouseEvent) sample code for java.awt.event.MouseListener.mouseClicked(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mouseClicked(java.awt.event.MouseEvent)

mouseDragged sample code for javax.swing.text.html.HTMLEditorKit.LinkController.mouseDragged(java.awt.event.MouseEvent) definition code for javax.swing.text.html.HTMLEditorKit.LinkController.mouseDragged(java.awt.event.MouseEvent)

public void mouseDragged(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Description copied from interface: MouseMotionListener sample code for java.awt.event.MouseMotionListener.mouseDragged(java.awt.event.MouseEvent) definition code for java.awt.event.MouseMotionListener.mouseDragged(java.awt.event.MouseEvent)
Invoked when a mouse button is pressed on a component and then dragged. MOUSE_DRAGGED events will continue to be delivered to the component where the drag originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).

Due to platform-dependent Drag&Drop implementations, MOUSE_DRAGGED events may not be delivered during a native Drag&Drop operation.

Specified by:
mouseDragged sample code for java.awt.event.MouseMotionListener.mouseDragged(java.awt.event.MouseEvent) definition code for java.awt.event.MouseMotionListener.mouseDragged(java.awt.event.MouseEvent) in interface MouseMotionListener sample code for java.awt.event.MouseMotionListener definition code for java.awt.event.MouseMotionListener

mouseMoved sample code for javax.swing.text.html.HTMLEditorKit.LinkController.mouseMoved(java.awt.event.MouseEvent) definition code for javax.swing.text.html.HTMLEditorKit.LinkController.mouseMoved(java.awt.event.MouseEvent)

public void mouseMoved(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Description copied from interface: MouseMotionListener sample code for java.awt.event.MouseMotionListener.mouseMoved(java.awt.event.MouseEvent) definition code for java.awt.event.MouseMotionListener.mouseMoved(java.awt.event.MouseEvent)
Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.

Specified by:
mouseMoved sample code for java.awt.event.MouseMotionListener.mouseMoved(java.awt.event.MouseEvent) definition code for java.awt.event.MouseMotionListener.mouseMoved(java.awt.event.MouseEvent) in interface MouseMotionListener sample code for java.awt.event.MouseMotionListener definition code for java.awt.event.MouseMotionListener

activateLink sample code for javax.swing.text.html.HTMLEditorKit.LinkController.activateLink(int, javax.swing.JEditorPane) definition code for javax.swing.text.html.HTMLEditorKit.LinkController.activateLink(int, javax.swing.JEditorPane)

protected void activateLink(int pos,
                            JEditorPane sample code for javax.swing.JEditorPane definition code for javax.swing.JEditorPane  editor)
Calls linkActivated on the associated JEditorPane if the given position represents a link.

This is implemented to forward to the method with the same name, but with the following args both == -1.

Parameters:
pos - the position
editor - the editor pane