pythagoras.f.XYMouse.Interaction, Pointer.Interaction, Touch.Interactionpublic abstract class Interaction<E extends playn.core.Event.XY>
extends java.lang.Object
implements pythagoras.f.XY
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Interaction.CaptureMode |
Used to configure
capture(). |
| Modifier and Type | Field | Description |
|---|---|---|
E |
event |
The event currently being dispatched in this interaction.
|
Layer |
hitLayer |
The layer that was hit at the start of this interaction.
|
pythagoras.f.Point |
local |
The current event's location, translated into the hit layer's coordinate space.
|
| Constructor | Description |
|---|---|
Interaction(Layer hitLayer,
boolean bubble) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
cancel() |
Cancels this interaction.
|
void |
capture() |
Captures this interaction in
ONLY mode. |
void |
capture(Interaction.CaptureMode mode) |
Captures this interaction in the specified capture mode.
|
boolean |
captured() |
Returns whether this interaction is captured.
|
java.lang.String |
toString() |
|
float |
x() |
Returns
event's x coordinate, for convenience. |
float |
y() |
Returns
event's y coordinate, for convenience. |
public final Layer hitLayer
public final pythagoras.f.Point local
public E extends playn.core.Event.XY event
public Interaction(Layer hitLayer, boolean bubble)
public float x()
event's x coordinate, for convenience.x in interface pythagoras.f.XYpublic float y()
event's y coordinate, for convenience.y in interface pythagoras.f.XYpublic boolean captured()
public void capture()
ONLY mode. This causes subsequent events in this
interaction to go only to the layer which is currently handling the interaction. Other layers
in the interaction will receive a cancellation event and nothing further.public void capture(Interaction.CaptureMode mode)
public void cancel()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018. All Rights Reserved.