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.PointThe press and drag positions.floatHow far the pointer strayed from the starting point, squared.final pythagoras.f.PointThe press and drag positions.final doubleTime the press started. -
Constructor Summary
ConstructorsConstructorDescriptionState(Pointer.Interaction iact) Creates a new tracking state with the given starting press event. -
Method Summary
Modifier and TypeMethodDescriptionvoidupdate(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).
-