Package org.silverpeas.mobile.client.common.reconizer.swipe

## Class SwipeRecognizer

- java.lang.Object
- - org.silverpeas.mobile.client.common.reconizer.swipe.SwipeRecognizer

- All Implemented Interfaces:
    `com.google.gwt.event.dom.client.TouchCancelHandler`, `com.google.gwt.event.dom.client.TouchEndHandler`, `com.google.gwt.event.dom.client.TouchMoveHandler`, `com.google.gwt.event.dom.client.TouchStartHandler`, `com.google.gwt.event.shared.EventHandler`

      public class SwipeRecognizer
      extends Object
      implements com.google.gwt.event.dom.client.TouchStartHandler, com.google.gwt.event.dom.client.TouchMoveHandler, com.google.gwt.event.dom.client.TouchEndHandler, com.google.gwt.event.dom.client.TouchCancelHandler

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SwipeRecognizer​(com.google.gwt.event.dom.client.HasAllTouchHandlers source)` | construct a swipe recognizer
    `SwipeRecognizer​(com.google.gwt.event.dom.client.HasAllTouchHandlers source, int minDistance)` | construct a swipe recognizer
    `SwipeRecognizer​(com.google.gwt.event.dom.client.HasAllTouchHandlers source, int minDistance, int threshold)` | construct a swipe recognizer

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `getMinDistance()` | the distance that needs to be covered before counting as a swipe
    `int` | `getThreshold()` | the threshold before an event is fired (deadzone)
    `void` | `onTouchCancel​(com.google.gwt.event.dom.client.TouchCancelEvent event)` |
    `void` | `onTouchEnd​(com.google.gwt.event.dom.client.TouchEndEvent event)` |
    `void` | `onTouchMove​(com.google.gwt.event.dom.client.TouchMoveEvent event)` |
    `void` | `onTouchStart​(com.google.gwt.event.dom.client.TouchStartEvent event)` |

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

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

- - ### Constructor Detail

    - #### SwipeRecognizer

          public SwipeRecognizer​(com.google.gwt.event.dom.client.HasAllTouchHandlers source)

      construct a swipe recognizer
      Parameters:
        `source` - the source to fire events on

    - #### SwipeRecognizer

          public SwipeRecognizer​(com.google.gwt.event.dom.client.HasAllTouchHandlers source,
                                 int minDistance)

      construct a swipe recognizer
      Parameters:
        `source` - the source to fire events on
        `minDistance` - the minimum distance to cover before this counts as a swipe

    - #### SwipeRecognizer

          public SwipeRecognizer​(com.google.gwt.event.dom.client.HasAllTouchHandlers source,
                                 int minDistance,
                                 int threshold)

      construct a swipe recognizer
      Parameters:
        `source` - the source to fire events on
        `minDistance` - the minimum distance to cover before this counts as a swipe
        `threshold` - the initial threshold before swipe start is fired

  - ### Method Detail

    - #### onTouchStart

          public void onTouchStart​(com.google.gwt.event.dom.client.TouchStartEvent event)

      Specified by:
        `onTouchStart` in interface `com.google.gwt.event.dom.client.TouchStartHandler`

    - #### onTouchMove

          public void onTouchMove​(com.google.gwt.event.dom.client.TouchMoveEvent event)

      Specified by:
        `onTouchMove` in interface `com.google.gwt.event.dom.client.TouchMoveHandler`

    - #### onTouchEnd

          public void onTouchEnd​(com.google.gwt.event.dom.client.TouchEndEvent event)

      Specified by:
        `onTouchEnd` in interface `com.google.gwt.event.dom.client.TouchEndHandler`

    - #### onTouchCancel

          public void onTouchCancel​(com.google.gwt.event.dom.client.TouchCancelEvent event)

      Specified by:
        `onTouchCancel` in interface `com.google.gwt.event.dom.client.TouchCancelHandler`

    - #### getThreshold

          public int getThreshold()

      the threshold before an event is fired (deadzone)
      Returns:
        the threshold in px

    - #### getMinDistance

          public int getMinDistance()

      the distance that needs to be covered before counting as a swipe
      Returns:
        the distance in px