protected class BasicMenuUI.MouseInputHandler extends Object implements MouseInputListener
这个类是受保护的,因此它可以被其他外观和感觉子类化以实现自己的鼠标处理行为。 所有重写的方法都应该调用父方法,以使菜单选择正确。
MenuSelectionManager
Modifier | Constructor and Description |
---|---|
protected |
MouseInputHandler() |
Modifier and Type | Method and Description |
---|---|
void |
mouseClicked(MouseEvent e)
在组件上单击(按下并释放)鼠标按钮时调用。
|
void |
mouseDragged(MouseEvent e)
在菜单上按下鼠标按钮然后拖动时调用。
|
void |
mouseEntered(MouseEvent e)
当光标进入菜单时调用。
|
void |
mouseExited(MouseEvent e)
当鼠标退出组件时调用。
|
void |
mouseMoved(MouseEvent e)
当鼠标光标移动到组件上但没有按钮被按下时调用。
|
void |
mousePressed(MouseEvent e)
当鼠标在菜单上点击时调用。
|
void |
mouseReleased(MouseEvent e)
当鼠标在菜单上释放时调用。
|
public void mouseClicked(MouseEvent e)
MouseListener
mouseClicked
在界面
MouseListener
public void mousePressed(MouseEvent e)
mousePressed
在接口
MouseListener
e
- 鼠标事件
public void mouseReleased(MouseEvent e)
mouseReleased
在界面
MouseListener
e
- 鼠标事件
public void mouseEntered(MouseEvent e)
mouseEntered
在界面
MouseListener
e
- 鼠标事件;
不曾用过
public void mouseExited(MouseEvent e)
MouseListener
mouseExited
在界面
MouseListener
public void mouseDragged(MouseEvent e)
mouseDragged
在接口
MouseMotionListener
e
- 鼠标事件
MouseMotionListener.mouseDragged(java.awt.event.MouseEvent)
public void mouseMoved(MouseEvent e)
MouseMotionListener
mouseMoved
在接口
MouseMotionListener
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.