ketai.ui

## Class KetaiGesture

- java.lang.Object
- - ketai.ui.KetaiGesture

- All Implemented Interfaces:
    android.view.GestureDetector.OnDoubleTapListener, android.view.GestureDetector.OnGestureListener

      public class KetaiGesture
      extends java.lang.Object
      implements android.view.GestureDetector.OnGestureListener, android.view.GestureDetector.OnDoubleTapListener

  Provides gesture recognition services to a processing sketch. To receive gesture events a sketch can define the following methods:
  void onTap(float x, float y) - x, y location of the tap
  void onDoubleTap(float x, float y) - x,y location of double tap
  void onFlick(float x, float y, float px, float py, float v) - x,y where flick ended, px,py - where flick began, v - velocity of flick in pixels/sec
  void onScroll(int x int y) - not currently used
  void onLongPress(float x, float y) - x, y position of long press
  void onPinch(float x, float y, float r) - x,y of center, r is the distance change
  void onRotate(float x, float y, float a) - x, y of center, a is the angle change in radians

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `KetaiGesture(processing.core.PApplet _parent)` Instantiates a new ketai gesture.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `onDoubleTap(android.view.MotionEvent arg0)`
    `boolean` | `onDoubleTapEvent(android.view.MotionEvent arg0)`
    `boolean` | `onDown(android.view.MotionEvent arg0)`
    `boolean` | `onFling(android.view.MotionEvent arg0, android.view.MotionEvent arg1, float arg2, float arg3)`
    `void` | `onLongPress(android.view.MotionEvent arg0)`
    `boolean` | `onScroll(android.view.MotionEvent arg0, android.view.MotionEvent arg1, float arg2, float arg3)`
    `void` | `onShowPress(android.view.MotionEvent arg0)`
    `boolean` | `onSingleTapConfirmed(android.view.MotionEvent arg0)`
    `boolean` | `onSingleTapUp(android.view.MotionEvent arg0)`
    `boolean` | `surfaceTouchEvent(android.view.MotionEvent event)` Surface touch event.
    `void` | `touchEvent(processing.event.TouchEvent e)` Touch event.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### KetaiGesture

          public KetaiGesture(processing.core.PApplet _parent)

      Instantiates a new ketai gesture.
      Parameters:
        `_parent` - the PApplet/sketch

  - ### Method Detail

    - #### onDown

          public boolean onDown(android.view.MotionEvent arg0)

      Specified by:
        `onDown` in interface `android.view.GestureDetector.OnGestureListener`

    - #### onFling

          public boolean onFling(android.view.MotionEvent arg0,
                                 android.view.MotionEvent arg1,
                                 float arg2,
                                 float arg3)

      Specified by:
        `onFling` in interface `android.view.GestureDetector.OnGestureListener`

    - #### onLongPress

          public void onLongPress(android.view.MotionEvent arg0)

      Specified by:
        `onLongPress` in interface `android.view.GestureDetector.OnGestureListener`

    - #### onScroll

          public boolean onScroll(android.view.MotionEvent arg0,
                                  android.view.MotionEvent arg1,
                                  float arg2,
                                  float arg3)

      Specified by:
        `onScroll` in interface `android.view.GestureDetector.OnGestureListener`

    - #### onShowPress

          public void onShowPress(android.view.MotionEvent arg0)

      Specified by:
        `onShowPress` in interface `android.view.GestureDetector.OnGestureListener`

    - #### onSingleTapUp

          public boolean onSingleTapUp(android.view.MotionEvent arg0)

      Specified by:
        `onSingleTapUp` in interface `android.view.GestureDetector.OnGestureListener`

    - #### touchEvent

          public void touchEvent(processing.event.TouchEvent e)

      Touch event.
      Parameters:
        `e` - the e

    - #### surfaceTouchEvent

          public boolean surfaceTouchEvent(android.view.MotionEvent event)

      Surface touch event.
      Parameters:
        `event` - the event
      Returns:
        true, if successful

    - #### onSingleTapConfirmed

          public boolean onSingleTapConfirmed(android.view.MotionEvent arg0)

      Specified by:
        `onSingleTapConfirmed` in interface `android.view.GestureDetector.OnDoubleTapListener`

    - #### onDoubleTap

          public boolean onDoubleTap(android.view.MotionEvent arg0)

      Specified by:
        `onDoubleTap` in interface `android.view.GestureDetector.OnDoubleTapListener`

    - #### onDoubleTapEvent

          public boolean onDoubleTapEvent(android.view.MotionEvent arg0)

      Specified by:
        `onDoubleTapEvent` in interface `android.view.GestureDetector.OnDoubleTapListener`