Eclipse Rich Ajax Platform Release 1.3

## org.eclipse.swt.widgets
Class TouchSource

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

public final class TouchSource
extends Object

Instances of this class represent a source of touch input. It is used to identify which input source generated a `Touch` object. It also provides information about the input source, which is important when deciding how to interpret the information in the `Touch` object.

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

- When an instance is marked as direct the touch source is a touch-sensitive digitizer surface such as a tablet or a touch screen. There is a one-to-one mapping between a touch point and a location in a window.
- When an instance is marked as indirect (or, more precisely, not direct) the touch source is a track pad or other device that normally moves the cursor, but can also interpret multiple touches on its surface. In this case, there is not a one-to-one map between the location of the touch on the device and a location on the display because the user can remove their finger or stylus and touch another part of the device and resume what they were doing.

Since:
  1.4
See Also:
  `Touch`

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, false for indirect.
`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, false for indirect.

  Returns:
    boolean If true, the input source is direct. If false, the input source is indirect.

### 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 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.