Eclipse Rich Ajax Platform

org.eclipse.swt.widgets
Class TouchSource

java.lang.Object
  extended by org.eclipse.swt.widgets.TouchSource

public final class TouchSource
extends java.lang.Object

Instances of this class represent sources of touch input that generate Touch objects. They also provide information about the input source, which is important for interpreting the information in the Touch object.

Instances of this class can be marked as direct or indirect:

Since:
1.4
See Also:
Touch, Sample code and further information

Method Summary
 Rectangle getBounds()
          Returns the bounding rectangle of the device.
 boolean isDirect()
          Returns the type of touch input this source generates, true for direct or false for indirect.
 java.lang.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
 

Method Detail

isDirect

public boolean isDirect()
Returns the type of touch input this source generates, true for direct or false for indirect.

Returns:
true if the input source is direct, or false otherwise

getBounds

public Rectangle getBounds()
Returns the bounding rectangle of the device. For a direct source, this corresponds to the bounds of the display device in pixels. For an indirect source, this contains the size of the device in pixels.

Note that the x and y values may not necessarily be zero if the TouchSource is a direct source.

Returns:
Rectangle The bounding rectangle of the input source.

toString

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

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the event

Eclipse Rich Ajax Platform

Copyright (c) EclipseSource and others 2002, 2012. All rights reserved.