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 . |
asMouseEvent
asJoystickButtonEvent, asJoystickEvent, asJoystickMoveEvent, asKeyEvent, asMouseButtonEvent, asSizeEvent, asTextEvent
public 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()
Event
MouseWheelEvent
.asMouseWheelEvent
in class Event
MouseWheelEvent
if its type is
Event.Type.MOUSE_WHEEL_MOVED
, null
otherwise.