public class GGMultiTouch
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
drag
Pressed followed by a move
|
static int |
idle
No touch event occured.
|
static int |
pointerPress
Screen pressed by a the next pointer
|
static int |
pointerRelease
Screen released by a pointer.
|
static int |
press
Screen pressed by the first pointer
|
static int |
release
Screen released by the last pointer.
|
Modifier and Type | Method and Description |
---|---|
static GGMultiTouch |
create()
Creates a GGMultiTouch instance with default values for the instance variables.
|
static GGMultiTouch |
create(GGMultiTouchListener listener,
int evt,
int x,
int y,
int pointerId,
int pointerCount)
Creates a GGMultiTouch instance with given values for the instance variables.
|
int |
getEvent()
Retrieves the current event type as integer.
|
java.lang.String |
getEventType()
Returns the event type as string.
|
int |
getPointerCount()
Retrieves the current number of pointers
|
int |
getPointerId()
Retrieves the current pointer id.
|
GGMultiTouchListener |
getSource()
Retrieves the GGMultiTouchListener reference that created the event.
|
int |
getX()
Retrieves the current x-coordinate of the touch position
with respect to the upper left vertex of the visible area in pixels.
|
int |
getY()
Retrieves the current x-coordinate of the touch position
with respect to the upper left vertex of the visible area in pixels.
|
public static final int idle
public static final int press
public static final int pointerPress
public static final int release
public static final int pointerRelease
public static final int drag
public static GGMultiTouch create()
public static GGMultiTouch create(GGMultiTouchListener listener, int evt, int x, int y, int pointerId, int pointerCount)
listener
- the listener instances that created the eventevt
- the event type (an or-combination of the predefined constants)x
- the x-coordinate where the event occurred (pixel coordinates
relative to the upper-left vertext of the game grid window)y
- the y-coordinate where the event occurred (pixel coordinates
relative to the upper-left vertext of the game grid window)public GGMultiTouchListener getSource()
public int getEvent()
public int getPointerId()
public int getPointerCount()
public int getX()
public int getY()
public java.lang.String getEventType()