com.stringsandints.inventium.khlrooster.gestionListeners
Class AbstractGestionListener

java.lang.Object
  extended by com.stringsandints.inventium.khlrooster.gestionListeners.AbstractGestionListener
Direct Known Subclasses:
DownFlingGestion, LeftFlingGestion, RightFlingGestion, UpFlingGestion

public abstract class AbstractGestionListener
extends java.lang.Object

An abstractGestionListener is an easy way to create a custom gestion. This custom gestion must implement the gestionDetected-method and can describe any action here. It is best practice to call the performAction-method when the gestion is detected. This simplifies the process of declaring a certain action for a given gestion. This AbstractGestionListener is a basic gestionListener and can only be used to know the start- and end-point of the gestion. All points made in between will be loosed in the process.

Author:
mathias

Field Summary
private  GestionAction actionOnGesture
           
private  float lastX
           
private  float lastY
           
 
Constructor Summary
AbstractGestionListener(GestionAction ga)
           
 
Method Summary
abstract  void gestionDected(float startX, float startY, float endX, float endY)
           
 void onGesture(GestureOverlayView arg0, MotionEvent me)
           
 void onGestureCancelled(GestureOverlayView arg0, MotionEvent arg1)
           
 void onGestureEnded(GestureOverlayView arg0, MotionEvent me)
           
 void onGestureStarted(GestureOverlayView arg0, MotionEvent me)
           
protected  void performAction()
           
protected  void setAction(GestionAction ga)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actionOnGesture

private GestionAction actionOnGesture

lastX

private float lastX

lastY

private float lastY
Constructor Detail

AbstractGestionListener

public AbstractGestionListener(GestionAction ga)
Method Detail

onGesture

public void onGesture(GestureOverlayView arg0,
                      MotionEvent me)

onGestureCancelled

public void onGestureCancelled(GestureOverlayView arg0,
                               MotionEvent arg1)

onGestureEnded

public void onGestureEnded(GestureOverlayView arg0,
                           MotionEvent me)

onGestureStarted

public void onGestureStarted(GestureOverlayView arg0,
                             MotionEvent me)

setAction

protected final void setAction(GestionAction ga)

performAction

protected final void performAction()

gestionDected

public abstract void gestionDected(float startX,
                                   float startY,
                                   float endX,
                                   float endY)