public static class HTMLEditorKit.LinkController extends MouseAdapter implements MouseMotionListener, Serializable
Constructor and Description |
---|
LinkController() |
Modifier and Type | Method and Description |
---|---|
protected void |
activateLink(int pos, JEditorPane editor)
如果给定的位置表示链接,则在相关联的JEditorPane上调用linkActivated。
|
void |
mouseClicked(MouseEvent e)
被称为鼠标点击事件。
|
void |
mouseDragged(MouseEvent e)
在组件上按下鼠标按钮然后拖动时调用。
|
void |
mouseMoved(MouseEvent e)
当鼠标光标移动到组件上但没有按钮被按下时调用。
|
mouseEntered, mouseExited, mousePressed, mouseReleased, mouseWheelMoved
public void mouseClicked(MouseEvent e)
mouseClicked
在接口
MouseListener
mouseClicked
在
MouseAdapter
e
- 鼠标事件
MouseListener.mouseClicked(java.awt.event.MouseEvent)
public void mouseDragged(MouseEvent e)
MouseAdapter
MOUSE_DRAGGED
事件将继续传递到拖动发起的组件,直到鼠标按钮释放(无论鼠标位置是否在组件的边界内)。
由于平台相关的拖放实现, MOUSE_DRAGGED
事件可能不会在本地拖放操作期间传递。
mouseDragged
在界面
MouseMotionListener
mouseDragged
在
MouseAdapter
public void mouseMoved(MouseEvent e)
MouseAdapter
mouseMoved
在接口
MouseMotionListener
mouseMoved
在
MouseAdapter
protected void activateLink(int pos, JEditorPane editor)
这被实现为转发到具有相同名称的方法,但是使用以下args都是== -1。
pos
- 位置
editor
- 编辑器窗格
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.