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:
Touch, Sample code and further information
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Rectangle | |
| pack-priv boolean | |
| pack-priv long |
| Access | Constructor and Description |
|---|---|
| pack-priv | TouchSource(long handle, boolean
Is the touch source direct or indirect? direct, Rectangle bounds)Constructs a new touch source from the given inputs. |
| Modifier and Type | Method and Description |
|---|---|
| public Rectangle | Returns: the bounding rectangle of the input sourceReturns the bounding rectangle of the device. |
| public boolean | Returns: true if the input source is direct, or false otherwiseReturns the type of touch input this source generates, |
| public String | Returns: a string representation of the eventOverrides java. |
| bounds | back to summary |
|---|---|
| pack-priv Rectangle bounds | |
| direct | back to summary |
|---|---|
| pack-priv boolean direct | |
| handle | back to summary |
|---|---|
| pack-priv long handle | |
| TouchSource | back to summary |
|---|---|
| pack-priv TouchSource(long handle, boolean direct, Rectangle bounds) Constructs a new touch source from the given inputs.
| |
| getBounds | back to summary |
|---|---|
| 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 points. Note that the x and y values may not necessarily be 0 if the TouchSource is a direct source.
| |
| isDirect | back to summary |
|---|---|
| public boolean isDirect() Returns the type of touch input this source generates,
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string containing a concise, human-readable description of the receiver. | |