public static class GestureDetector.GestureAdapter extends java.lang.Object implements GestureDetector.GestureListener
GestureDetector.GestureListener
.Constructor and Description |
---|
GestureAdapter() |
Modifier and Type | Method and Description |
---|---|
boolean |
fling(float velocityX,
float velocityY,
int button)
Called when the user dragged a finger over the screen and lifted it.
|
boolean |
longPress(float x,
float y) |
boolean |
pan(float x,
float y,
float deltaX,
float deltaY)
Called when the user drags a finger over the screen.
|
boolean |
panStop(float x,
float y,
int pointer,
int button)
Called when no longer panning.
|
boolean |
pinch(Vector2 initialPointer1,
Vector2 initialPointer2,
Vector2 pointer1,
Vector2 pointer2)
Called when a user performs a pinch zoom gesture.
|
void |
pinchStop()
Called when no longer pinching.
|
boolean |
tap(float x,
float y,
int count,
int button)
Called when a tap occured.
|
boolean |
touchDown(float x,
float y,
int pointer,
int button) |
boolean |
zoom(float initialDistance,
float distance)
Called when the user performs a pinch zoom gesture.
|
public boolean touchDown(float x, float y, int pointer, int button)
touchDown
in interface GestureDetector.GestureListener
InputProcessor.touchDown(int, int, int, int)
public boolean tap(float x, float y, int count, int button)
GestureDetector.GestureListener
GestureDetector
.tap
in interface GestureDetector.GestureListener
count
- the number of taps.public boolean longPress(float x, float y)
longPress
in interface GestureDetector.GestureListener
public boolean fling(float velocityX, float velocityY, int button)
GestureDetector.GestureListener
fling
in interface GestureDetector.GestureListener
velocityX
- velocity on x in secondsvelocityY
- velocity on y in secondspublic boolean pan(float x, float y, float deltaX, float deltaY)
GestureDetector.GestureListener
pan
in interface GestureDetector.GestureListener
deltaX
- the difference in pixels to the last drag event on x.deltaY
- the difference in pixels to the last drag event on y.public boolean panStop(float x, float y, int pointer, int button)
GestureDetector.GestureListener
panStop
in interface GestureDetector.GestureListener
public boolean zoom(float initialDistance, float distance)
GestureDetector.GestureListener
zoom
in interface GestureDetector.GestureListener
initialDistance
- distance between fingers when the gesture started.distance
- current distance between fingers.public boolean pinch(Vector2 initialPointer1, Vector2 initialPointer2, Vector2 pointer1, Vector2 pointer2)
GestureDetector.GestureListener
pinch
in interface GestureDetector.GestureListener
public void pinchStop()
GestureDetector.GestureListener
pinchStop
in interface GestureDetector.GestureListener