Package tripleplay.ui

Class Behavior.Track.State

java.lang.Object
tripleplay.ui.Behavior.Track.State
Enclosing class:
Behavior.Track<T extends Element<T>>

public class Behavior.Track.State extends Object
Holds the necessary data for the currently active press. Track subclasses can derive if more transient information is needed.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final 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

    Constructors
    Constructor
    Description
    Creates a new tracking state with the given starting press event.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Updates the state to the current event value and called Behavior.Track.onTrack(pythagoras.f.Point, pythagoras.f.Point).

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • pressTime

      public final double pressTime
      Time the press started.
    • press

      public final pythagoras.f.Point press
      The press and drag positions.
    • drag

      public final pythagoras.f.Point drag
      The press and drag positions.
    • maxDistanceSq

      public float maxDistanceSq
      How far the pointer strayed from the starting point, squared.
  • Constructor Details

    • State

      public State(Pointer.Interaction iact)
      Creates a new tracking state with the given starting press event.
  • Method Details

    • update

      public void update(Pointer.Interaction iact)
      Updates the state to the current event value and called Behavior.Track.onTrack(pythagoras.f.Point, pythagoras.f.Point).