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.