Class TouchPoint

java.lang.Object
com.sparshui.server.TouchPoint

public class TouchPoint extends Object
Represents a touch point.
Author:
Tony Ross
  • Constructor Details

    • TouchPoint

      public TouchPoint(int id, Location location, long time)
      Parameters:
      id -
      location -
      time -
    • TouchPoint

      public TouchPoint(TouchPoint tp)
      Copy constructor
      Parameters:
      tp -
  • Method Details

    • isClaimed

      public boolean isClaimed()
      The GestureServer needs to know whether an incoming touchPoint is bound to a client or not so that it can tell the input device whether or not to consume the event.
      Returns:
      whether a client has claimed this touchPoint
    • getTime

      public long getTime()
    • getID

      public int getID()
      Get the touch point ID.
      Returns:
      The touch point ID.
    • getLocation

      public Location getLocation()
      Get the touch point location.
      Returns:
      The location of this touch point.
    • getState

      public int getState()
      Get the touch point state.
      Returns:
      The state of this touch point.
    • setState

      public void setState(int state)
    • setGroup

      public void setGroup(Group group)
      Set the group for this touch point.
      Parameters:
      group - The group the touch point should belong to.
    • update

      public void update(Location location, long time, int state)
      Update this touch point with a new location and state.
      Parameters:
      location - The new location.
      time -
      state - The new state.
    • resetChanged

      public void resetChanged()
      Reset the changed flag.
    • isChanged

      public boolean isChanged()
      Get the value of the changed flag.
      Returns:
      True if this touchpoint has changed since the last time resetChanged() was called.
    • clone

      public Object clone()
      Overrides:
      clone in class Object
    • isNear

      public boolean isNear(TouchPoint tp)