public class Touch
extends java.lang.Object
Constructor and Description |
---|
Touch(double x,
double y,
int taps)
Creates a touch given its coordinates and number of taps.
|
Modifier and Type | Method and Description |
---|---|
Point |
getPoint()
Returns the point location of this touch event.
|
Shape |
getShape()
Returns the shape over which this touch event occurred.
|
int |
getTaps()
Returns the number of taps for this touch event.
|
int |
getX()
Returns the x-coordinate of this touch event.
|
int |
getY()
Returns the y-coordinate of this touch event.
|
void |
setShape(Shape s)
Sets the shape over which this touch event occurred.
|
public Touch(double x, double y, int taps)
x
- the x-coordinate of the touch eventy
- the y-coordinate of the touch eventtaps
- the number of taps (1 or 2) of the touch eventpublic Point getPoint()
public Shape getShape()
null
if no shape was touchedpublic int getTaps()
public int getX()
public int getY()
public void setShape(Shape s)