Package org.eclipse.swt.widgets
Class Touch
- java.lang.Object
-
- org.eclipse.swt.widgets.Touch
-
public final class Touch extends java.lang.ObjectInstances of this class are created in response to a touch-based input device being touched. They are found in thetouchesfield of an Event or TouchEvent.- Since:
- 1.4
- See Also:
TouchEvent, Sample code and further information
-
-
Field Summary
Fields Modifier and Type Field Description longidThe unique identity of the touch.booleanprimaryA flag indicating that the touch is the first touch from a previous state of no touch points.TouchSourcesourceThe object representing the input source that generated the touch.intstateThe state of this touch at the time it was generated.intxThe X location of the touch in TouchSource coordinatesintyThe Y location of the touch in TouchSource coordinates
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringtoString()Returns a string containing a concise, human-readable description of the receiver.
-
-
-
Field Detail
-
id
public long id
The unique identity of the touch. Use this value to track changes to a touch during the touch's life. Two touches may have the same identity even if they come from different sources.
-
source
public TouchSource source
The object representing the input source that generated the touch.
-
state
public int state
The state of this touch at the time it was generated. If this field is 0 then the finger is still touching the device but has not moved since the lastTouchEventwas generated.- See Also:
SWT.TOUCHSTATE_DOWN,SWT.TOUCHSTATE_MOVE,SWT.TOUCHSTATE_UP
-
primary
public boolean primary
A flag indicating that the touch is the first touch from a previous state of no touch points. Once designated as such, the touch remains the primary touch until all fingers are removed from the device.
-
x
public int x
The X location of the touch in TouchSource coordinates
-
y
public int y
The Y location of the touch in TouchSource coordinates
-
-