Package com.sparshui.server
Class TouchPoint
java.lang.Object
com.sparshui.server.TouchPoint
Represents a touch point.
- Author:
- Tony Ross
-
Constructor Summary
ConstructorsConstructorDescriptionTouchPoint
(int id, Location location, long time) TouchPoint
(TouchPoint tp) Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionclone()
int
getID()
Get the touch point ID.Get the touch point location.int
getState()
Get the touch point state.long
getTime()
boolean
Get the value of the changed flag.boolean
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.boolean
isNear
(TouchPoint tp) void
Reset the changed flag.void
Set the group for this touch point.void
setState
(int state) void
Update this touch point with a new location and state.
-
Constructor Details
-
TouchPoint
- Parameters:
id
-location
-time
-
-
TouchPoint
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
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
Set the group for this touch point.- Parameters:
group
- The group the touch point should belong to.
-
update
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
-
isNear
-