public interface MouseWheelListener extends EventListener
MouseListener
。鼠标移动和拖动使用
MouseMotionListener
有兴趣处理鼠标滚轮事件的类实现了此接口(以及它所包含的所有方法)。
从这个类进行了注册一个组件使用的组件的addMouseWheelListener
方法创建监听对象。当鼠标滚轮旋转时产生一个鼠标滚轮事件。当鼠标滚轮事件发生时,该对象的mouseWheelMoved
方法被调用。
关于如何,鼠标滚轮事件都出动了,看到MouseWheelEvent
类的描述。
MouseWheelEvent
Modifier and Type | Method and Description |
---|---|
void |
mouseWheelMoved(MouseWheelEvent e)
当鼠标滚轮旋转时调用。
|
void mouseWheelMoved(MouseWheelEvent e)
MouseWheelEvent
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.