Package limn.scene.event
Class MouseEvent
java.lang.Object
limn.scene.event.InputEvent
limn.scene.event.MouseEvent
A pointer event, positioned in scene coordinates (logical points, origin at
the window's top-left). Convert to a widget's space with
widget.sceneToLocalX/Y. ENTER/EXIT target the
hovered leaf and do not bubble; every other type bubbles from the target to
its ancestors until consumed.
MOTION is the relative-capture stream: while the window is in
PointerMode.RELATIVE, motion arrives as unbounded
deltaX()/deltaY() deltas delivered to the focused
widget (like keys, since there is no meaningful cursor position to
hit-test); x()/y() hold the stale position where the
capture began.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionMouseEvent(MouseEvent.Type type, float x, float y, int button, float scrollX, float scrollY, int modifiers) A pointer event;xandyare in the receiving widget's coordinates. -
Method Summary
Methods inherited from class limn.scene.event.InputEvent
consume, isConsumed
-
Constructor Details
-
MouseEvent
public MouseEvent(MouseEvent.Type type, float x, float y, int button, float scrollX, float scrollY, int modifiers) A pointer event;xandyare in the receiving widget's coordinates.
-
-
Method Details
-
type
Which pointer transition this is. -
x
public float x()- Returns:
- pointer x in scene coordinates
-
y
public float y()- Returns:
- pointer y in scene coordinates
-
button
public int button()- Returns:
- the button (
Keys.MOUSE_LEFT…), or -1 when not a button event
-
scrollX
public float scrollX()- Returns:
- accumulated horizontal wheel delta (WHEEL only)
-
scrollY
public float scrollY()- Returns:
- accumulated vertical wheel delta (WHEEL only)
-
deltaX
public float deltaX()- Returns:
- accumulated relative horizontal motion in logical points (MOTION only)
-
deltaY
public float deltaY()- Returns:
- accumulated relative vertical motion in logical points (MOTION only)
-
modifiers
public int modifiers()- Returns:
- modifier bitmask (
Keys.MOD_SHIFT…)
-
toString
-