JavaTM 2 Platform
Standard Ed. 6

javax.swing.text.html
类 HTMLEditorKit.LinkController

java.lang.Object
  继承者 java.awt.event.MouseAdapter
      继承者 javax.swing.text.html.HTMLEditorKit.LinkController
所有已实现的接口:
MouseListener, MouseMotionListener, MouseWheelListener, Serializable, EventListener
正在封闭类:
HTMLEditorKit

public static class HTMLEditorKit.LinkController
extends MouseAdapter
implements MouseMotionListener, Serializable

此类用于观察关联组件并在适当的时候触发该组件上的超链接事件。


构造方法摘要
HTMLEditorKit.LinkController()
           
 
方法摘要
protected  void activateLink(int pos, JEditorPane editor)
          如果给定位置表示一个链接,则调用关联 JEditorPane 上的 linkActivated。
 void mouseClicked(MouseEvent e)
          鼠标单击事件时调用。
 void mouseDragged(MouseEvent e)
          鼠标按键在组件上按下并拖动时调用。
 void mouseMoved(MouseEvent e)
          鼠标光标移动到组件上但无按键按下时调用。
 
从类 java.awt.event.MouseAdapter 继承的方法
mouseEntered, mouseExited, mousePressed, mouseReleased, mouseWheelMoved
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

HTMLEditorKit.LinkController

public HTMLEditorKit.LinkController()
方法详细信息

mouseClicked

public void mouseClicked(MouseEvent e)
鼠标单击事件时调用。如果组件是只读的(例如浏览器),则用单击事件驱动一个试图跟随由链接指定的引用。

指定者:
接口 MouseListener 中的 mouseClicked
覆盖:
MouseAdapter 中的 mouseClicked
参数:
e - 鼠标事件
另请参见:
MouseListener.mouseClicked(java.awt.event.MouseEvent)

mouseDragged

public void mouseDragged(MouseEvent e)
从类 MouseAdapter 复制的描述
鼠标按键在组件上按下并拖动时调用。在释放鼠标按键前,MOUSE_DRAGGED 事件被连续地传递到发起该拖动的组件(而不管鼠标位置是否处于该组件的边界内)。

由于拖放实现是与平台相关的,所以在本机拖放操作期间可能不传递 MOUSE_DRAGGED 事件。

指定者:
接口 MouseMotionListener 中的 mouseDragged
覆盖:
MouseAdapter 中的 mouseDragged

mouseMoved

public void mouseMoved(MouseEvent e)
从类 MouseAdapter 复制的描述
鼠标光标移动到组件上但无按键按下时调用。

指定者:
接口 MouseMotionListener 中的 mouseMoved
覆盖:
MouseAdapter 中的 mouseMoved

activateLink

protected void activateLink(int pos,
                            JEditorPane editor)
如果给定位置表示一个链接,则调用关联 JEditorPane 上的 linkActivated。

实现它的目的是为了转发到具有相同名称但后续参数都 == -1 的方法。

参数:
pos - 位置
editor - 编辑器窗格

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only