| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | TouchState.
Describes a single touch point |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private static Comparator | |
| private TouchState. | |
| private int | |
| private MonocleWindow |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv TouchState. | Returns: the Point with the data for the new touch point. The fields of this Point may be modified directly to change the data for the new touch point.the Point describing the data to add, or null if no data is
available yet for this point. p is not modified,
but its contents are copied to the object describing the new
Point. pAdds a Point to this state object. |
| pack-priv void | |
| pack-priv boolean | canBeFoldedWith(TouchState
the TouchState to compare to ts, boolean if true, ignore IDs when comparing points ignoreIDs)Finds out whether two non-null states are identical in everything but their touch point coordinates |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | copyTo(TouchState
The TouchState to which to copy this state's data. target)Copies the contents of this state object to another. |
| pack-priv boolean | |
| pack-priv TouchState. | Returns: A touch point.The index of the point point to return. index should be less
than the value returned by getPointCount(). index)Returns the nth point in the toich point list, for index n |
| pack-priv int | |
| pack-priv TouchState. | Returns: a matching Point, or null if there is no point with that ID.The Point ID to match. A value of -1 matches any Point. id)Gets the Point matching the given ID. if available |
| pack-priv int | |
| pack-priv MonocleWindow | getWindow(boolean
true if the cached value should be discarded and
recomputed recalculateCache, MonocleWindow the window to use if no primary ID is available fallback)Returns the Glass window on which this event state is located. |
| pack-priv void | removePointForID(int
The ID of the touch point which is to be removed. id)Removes the point with the given ID |
| pack-priv void | setPoint(int
the index at which to change the touch point data index, TouchState.the data to copy to the given index. pReplaces the touch point data at the given index with the given touch point data |
| pack-priv void | sortPointsByID()
Modifies the ordering touch points in this state object so that the points are sorted in increasing order of ID. |
| public String |
| pointCount | back to summary |
|---|---|
| private int pointCount | |
| pointIdComparator | back to summary |
|---|---|
| private static Comparator<TouchState. | |
| points | back to summary |
|---|---|
| private TouchState. | |
| primaryID | back to summary |
|---|---|
| private int primaryID | |
| window | back to summary |
|---|---|
| private MonocleWindow window | |
| TouchState | back to summary |
|---|---|
| pack-priv TouchState() | |
| addPoint | back to summary |
|---|---|
| pack-priv TouchState. Adds a Point to this state object.
| |
| assignPrimaryID | back to summary |
|---|---|
| pack-priv void assignPrimaryID() Updates the primary point ID | |
| canBeFoldedWith | back to summary |
|---|---|
| pack-priv boolean canBeFoldedWith(TouchState ts, boolean ignoreIDs) Finds out whether two non-null states are identical in everything but their touch point coordinates
| |
| clear | back to summary |
|---|---|
| pack-priv void clear() Removes all touch points from this state. | |
| clearWindow | back to summary |
|---|---|
| pack-priv void clearWindow() Clears the cached window. | |
| copyTo | back to summary |
|---|---|
| pack-priv void copyTo(TouchState target) Copies the contents of this state object to another.
| |
| equalsSorted | back to summary |
|---|---|
| pack-priv boolean equalsSorted(TouchState ts) Compare two non-null states whose points are sorted by ID | |
| getPoint | back to summary |
|---|---|
| pack-priv TouchState. Returns the nth point in the toich point list, for index n
| |
| getPointCount | back to summary |
|---|---|
| pack-priv int getPointCount() Returns the number of touch points pressed.
| |
| getPointForID | back to summary |
|---|---|
| pack-priv TouchState. Gets the Point matching the given ID. if available
| |
| getPrimaryID | back to summary |
|---|---|
| pack-priv int getPrimaryID() Returns the touch point ID of the primary point. | |
| getWindow | back to summary |
|---|---|
| pack-priv MonocleWindow getWindow(boolean recalculateCache, MonocleWindow fallback) Returns the Glass window on which this event state is located. assignPrimaryID() should be called before this method.
| |
| removePointForID | back to summary |
|---|---|
| pack-priv void removePointForID(int id) Removes the point with the given ID
| |
| setPoint | back to summary |
|---|---|
| pack-priv void setPoint(int index, TouchState. Replaces the touch point data at the given index with the given touch point data
| |
| sortPointsByID | back to summary |
|---|---|
| pack-priv void sortPointsByID() Modifies the ordering touch points in this state object so that the points are sorted in increasing order of ID. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | copyTo(TouchState.
the Point object to which to copy this object's data targetCopies a touch point's data to a target Point |
| public String |
| id | back to summary |
|---|---|
| pack-priv int id | |
| x | back to summary |
|---|---|
| pack-priv int x | |
| y | back to summary |
|---|---|
| pack-priv int y | |
| Point | back to summary |
|---|---|
| pack-priv Point() | |
| copyTo | back to summary |
|---|---|
| pack-priv void copyTo(TouchState. Copies a touch point's data to a target Point
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |