public final class MouseWheelEvent extends MouseEvent
Event.Type.MOUSE_WHEEL_MOVED.Event.Type| Modifier and Type | Field and Description |
|---|---|
int |
delta
The amount of ticks that the mouse wheel was moved.
|
position| Constructor and Description |
|---|
MouseWheelEvent(int type,
int x,
int y,
int delta)
Constructs a new mouse wheel event.
|
| Modifier and Type | Method and Description |
|---|---|
MouseWheelEvent |
asMouseWheelEvent()
Attempts to cast this event to a
MouseWheelEvent. |
asMouseEventasJoystickButtonEvent, asJoystickEvent, asJoystickMoveEvent, asKeyEvent, asMouseButtonEvent, asSizeEvent, asTextEventpublic MouseWheelEvent(int type,
int x,
int y,
int delta)
type - the type of the event.
This must be a valid ordinal in the Event.Type enumeration.x - the X coordinate of the mouse cursor relative to the window.y - the Y coordinate of the mouse cursor relative to the window.delta - the amount of ticks that the mouse wheel was moved.public MouseWheelEvent asMouseWheelEvent()
EventMouseWheelEvent.asMouseWheelEvent in class EventMouseWheelEvent if its type is
Event.Type.MOUSE_WHEEL_MOVED, null otherwise.