Eclipse Rich Ajax Platform
Release 1.3

org.eclipse.swt.widgets
Class Touch

java.lang.Object
  extended byorg.eclipse.swt.widgets.Touch

public final class Touch
extends Object

Instances of this class are created as a result of a touch-based input device being touched. They are found in the touches field of an Event or TouchEvent.

Since:
1.4
See Also:
TouchEvent, Event, Sample code and further information

Field Summary
 long id
          unique identity of the touch.
 boolean primary
          a flag indicating that the touch is the first touch from a previous state of no touch points.
 TouchSource source
          object representing the input source that generated the touch
 int state
          the state of this touch at the time it was generated.
 int x
          the X location of the touch in TouchSource coordinates
 int y
          the Y location of the touch in TouchSource coordinates
 
Method Summary
 String toString()
          Returns a string containing a concise, human-readable description of the receiver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

public long id
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 though they came from different sources.


source

public TouchSource source
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 the finger is still touching the device but has not otherwise moved since the last TouchEvent was 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

Method Detail

toString

public String toString()
Returns a string containing a concise, human-readable description of the receiver.

Returns:
a string representation of the event

Eclipse Rich Ajax Platform
Release 1.3

Copyright (c) Innoopract Informationssysteme GmbH and others 2002, 2011. All rights reserved.