public abstract class
BaseGesture
Known Direct Subclasses |
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 | BaseGesture.OnGestureEventListener<T extends BaseGesture<T>> | Interface definition for callbacks to be invoked by a BaseGesture . |
Fields
protected final GesturePointersUtility | gesturePointersUtility | |
protected Node | targetNode |
Public Constructors
BaseGesture(GesturePointersUtility gesturePointersUtility)
|
Public Methods
Node | |
boolean | |
boolean | |
float |
inchesToPixels(float inches)
|
boolean | |
void | |
float |
pixelsToInches(float pixels)
|
void |
setGestureEventListener(OnGestureEventListener<T> listener)
|
boolean |
Protected Methods
abstract boolean | |
void |
cancel()
|
void |
complete()
|
abstract T |
getSelf()
|
abstract void |
onCancel()
|
abstract void |
onFinish()
|
abstract void | |
abstract boolean |
Inherited Methods
Fields
Public Constructors
public BaseGesture (GesturePointersUtility gesturePointersUtility)
Parameters
gesturePointersUtility |
---|
Public Methods
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 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 |