public abstract class BaseGesture
Known Direct Subclasses
DragGesture | Gesture for when the user performs a drag motion on the touch screen. |
PinchGesture | Gesture for when the user performs a two-finger pinch motion on the touch screen. |
TwistGesture | Gesture for when the user performs a two-finger twist motion on the touch screen. |
Base class for a gesture.
A gesture represents a sequence of touch events that are detected to represent a particular type of motion (i.e. Dragging, Pinching).
Gestures are created and updated by BaseGestureRecognizer's.
Nested Classes
interface
Fields
protected final GesturePointersUtility | gesturePointersUtility | * |
protected Node | targetNode | * |
---|
Public Constructors
Public Methods
Node | |
boolean | hasFinished
()
|
boolean | hasStarted
()
|
float | inchesToPixels
(float inches)
|
boolean | justStarted
()
|
void | |
float | pixelsToInches
(float pixels)
|
void | |
boolean | wasCancelled
()
|
Protected Methods
abstract boolean | |
void | cancel
()
|
void | complete
()
|
abstract T | getSelf
()
|
abstract void | onCancel
()
|
abstract void | onFinish
()
|
abstract void | |
abstract boolean |
Inherited Methods
Fields
protected final GesturePointersUtility gesturePointersUtility
protected Node targetNode
Public Constructors
public BaseGesture ( GesturePointersUtility gesturePointersUtility)
Parameters
gesturePointersUtility
Public Methods
public Node getTargetNode ()
public boolean hasFinished ()
public boolean hasStarted ()
public float inchesToPixels (float inches)
Parameters
inches
public boolean justStarted ()
public void onTouch ( HitTestResult hitTestResult, MotionEvent motionEvent)
Parameters
hitTestResult |
---|
motionEvent |
public float pixelsToInches (float pixels)
Parameters
pixels
public void setGestureEventListener ( OnGestureEventListener <T> listener)
Parameters
listener
public boolean wasCancelled ()
Protected Methods
protected abstract boolean canStart ( HitTestResult hitTestResult, MotionEvent motionEvent)
Parameters
hitTestResult |
---|
motionEvent |
protected void cancel ()
protected void complete ()
protected abstract T getSelf ()
protected abstract void onCancel ()
protected abstract void onFinish ()
protected abstract void onStart ( HitTestResult hitTestResult, MotionEvent motionEvent)
Parameters
hitTestResult |
---|
motionEvent |
protected abstract boolean updateGesture ( HitTestResult hitTestResult, MotionEvent motionEvent)
Parameters
hitTestResult |
---|
motionEvent |