Package playn.scene
Class Mouse.Listener
- All Implemented Interfaces:
Reactor.RListener
,SignalView.Listener<Object>
,ValueView.Listener<Object>
- Enclosing class:
Mouse
A listener for mouse button, motion and wheel events with layer info.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onButton
(Mouse.ButtonEvent event, Mouse.Interaction iact) Notifies listener of a mouse button event.void
onCancel()
Notifies the listener that the current interaction was canceled.void
onDrag
(Mouse.MotionEvent event, Mouse.Interaction iact) Notifies listener of a mouse drag event.final void
void
onHover
(Mouse.HoverEvent event, Mouse.Interaction iact) Notifies listener of mouse entry or exit.void
onMotion
(Mouse.MotionEvent event, Mouse.Interaction iact) Notifies listener of a mouse motion event.void
onWheel
(Mouse.WheelEvent event, Mouse.Interaction iact) Notifies listener of a mouse wheel event.
-
Constructor Details
-
Listener
public Listener()
-
-
Method Details
-
onMotion
Notifies listener of a mouse motion event. A motion event is dispatched when no button is currently pressed, in an isolated "one shot" interaction, and always goes to the layer hit by the event coordinates. -
onHover
Notifies listener of mouse entry or exit. Hover events are dispatched in an isolated "one shot" interaction, regardless of whether there is currently a button-triggered interaction in progress, and always got to the layer whose hover status changed. -
onButton
Notifies listener of a mouse button event. A button down event will start an interaction if no interaction is already in progress, or will be dispatched to the hit layer of the current interaction if an interaction is in progress. If additional buttons are pressed during an interaction, the interaction does not end until all of the buttons are released. -
onDrag
Notifies listener of a mouse drag event. A drag event is dispatched when a button event has started an interaction, and always goes to the layer hit by the button event that started the interaction, not to the layer intersected by the motion event coordinates. -
onWheel
Notifies listener of a mouse wheel event. If no interaction is in progress, the wheel event is dispatched to the layer intersected by the event coordinates, but if an interaction is in progress, the event goes to the layer hit by the event that started the interaction. -
onCancel
public void onCancel()Notifies the listener that the current interaction was canceled. This is dispatched when some other layer that was also privy to this interaction has captured the interaction. -
onEmit
-