Package tripleplay.ui
Class Behavior.Track.State
java.lang.Object
tripleplay.ui.Behavior.Track.State
- Enclosing class:
Behavior.Track<T extends Element<T>>
Holds the necessary data for the currently active press.
Track
subclasses can
derive if more transient information is needed.-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal pythagoras.f.Point
The press and drag positions.float
How far the pointer strayed from the starting point, squared.final pythagoras.f.Point
The press and drag positions.final double
Time the press started. -
Constructor Summary
ConstructorsConstructorDescriptionState
(Pointer.Interaction iact) Creates a new tracking state with the given starting press event. -
Method Summary
Modifier and TypeMethodDescriptionvoid
update
(Pointer.Interaction iact) Updates the state to the current event value and calledBehavior.Track.onTrack(pythagoras.f.Point, pythagoras.f.Point)
.
-
Field Details
-
pressTime
public final double pressTimeTime the press started. -
press
public final pythagoras.f.Point pressThe press and drag positions. -
drag
public final pythagoras.f.Point dragThe press and drag positions. -
maxDistanceSq
public float maxDistanceSqHow far the pointer strayed from the starting point, squared.
-
-
Constructor Details
-
State
Creates a new tracking state with the given starting press event.
-
-
Method Details
-
update
Updates the state to the current event value and calledBehavior.Track.onTrack(pythagoras.f.Point, pythagoras.f.Point)
.
-