Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.maryanovsky.gwtutils.client.ui.touch.gestures.mftap
Class MultiFingerTapRecognizer

    java.lang.Object
      com.maryanovsky.gwtutils.client.ui.touch.gestures.TouchGestureRecognizer
          com.maryanovsky.gwtutils.client.ui.touch.gestures.mftap.MultiFingerTapRecognizer

All Implemented Interfaces:
  HasMultiFingerTapHandlers

    public class MultiFingerTapRecognizer

extends TouchGestureRecognizer
implements HasMultiFingerTapHandlers

Recognizes and fires multi-finger, single-tap events.

Author:
  Maryanovsky Alexander

Field Summary

Fields inherited from class com.maryanovsky.gwtutils.client.ui.touch.gestures.TouchGestureRecognizer
`handlerManager`

Constructor Summary
`MultiFingerTapRecognizer(Object multiFingerTapEventSource)` Creates a new `MultiFingerTapRecognizer` which will fire multi-finger tap events with the specified source object.
`MultiFingerTapRecognizer(Object multiFingerTapEventSource, Condition<? super MultiFingerTapEvent> multiFingerTapCondition)` Creates a new `MultiFingerTapRecognizer` which will fire multi-finger tap events with the specified source object and consult the specified tap condition before doing so.
`MultiFingerTapRecognizer(Object multiFingerTapEventSource, H touchEventsSource)` Creates a new `MultiFingerTapRecognizer` which will fire multi-finger tap events with the specified source object and use the specified source of touch events.
`MultiFingerTapRecognizer(Object multiFingerTapEventSource, H touchEventsSource, Condition<? super MultiFingerTapEvent> multiFingerTapCondition)` Creates a new `MultiFingerTapRecognizer` which will fire events with the specified source object, use the specified source of touch events and consult the specified tap condition before firing the events.

Method Summary
`HandlerRegistration` | `addMultiFingerTapHandler(MultiFingerTapHandler handler)` Adds a multi-finger tap handler.
`protected boolean` | `multiFingerTapCondition(MultiFingerTapEvent evt)` Returns whether the specified `MultiFingerTapEvent` should be delivered to the handlers.
`protected void` | `onTouchCancel(TouchCancelEvent evt)` Invoked when a touch event is canceled.
`protected void` | `onTouchEnd(TouchEndEvent evt)` Invoked when a finger touching the screen is lifted.
`protected void` | `onTouchMove(TouchMoveEvent evt)` Invoked when a finger touching the screen is moved.
`protected void` | `onTouchStart(TouchStartEvent evt)` Invoked when a touch starts.

Methods inherited from class com.maryanovsky.gwtutils.client.ui.touch.gestures.TouchGestureRecognizer
`fireEvent, setTouchEventsSource`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MultiFingerTapRecognizer

    public MultiFingerTapRecognizer(Object multiFingerTapEventSource)

  Creates a new `MultiFingerTapRecognizer` which will fire multi-finger tap events with the specified source object.

### MultiFingerTapRecognizer

    public MultiFingerTapRecognizer(Object multiFingerTapEventSource,
                                    H touchEventsSource)

  Creates a new `MultiFingerTapRecognizer` which will fire multi-finger tap events with the specified source object and use the specified source of touch events.

### MultiFingerTapRecognizer

    public MultiFingerTapRecognizer(Object multiFingerTapEventSource,
                                    Condition<? super MultiFingerTapEvent> multiFingerTapCondition)

  Creates a new `MultiFingerTapRecognizer` which will fire multi-finger tap events with the specified source object and consult the specified tap condition before doing so.

### MultiFingerTapRecognizer

    public MultiFingerTapRecognizer(Object multiFingerTapEventSource,
                                    H touchEventsSource,
                                    Condition<? super MultiFingerTapEvent> multiFingerTapCondition)

  Creates a new `MultiFingerTapRecognizer` which will fire events with the specified source object, use the specified source of touch events and consult the specified tap condition before firing the events. See the documentation of `multiFingerTapCondition(MultiFingerTapEvent)` for more information on the tap condition.

Method Detail

### addMultiFingerTapHandler

    public HandlerRegistration addMultiFingerTapHandler(MultiFingerTapHandler handler)

  Adds a multi-finger tap handler.

  Specified by:
    `addMultiFingerTapHandler` in interface `HasMultiFingerTapHandlers`

### multiFingerTapCondition

    protected boolean multiFingerTapCondition(MultiFingerTapEvent evt)

  Returns whether the specified `MultiFingerTapEvent` should be delivered to the handlers. This allows filtering multi-finger tap gestures to only those you really want. For example, if you only want to recognize two-finger taps, you would override this method and return `evt.getFingerCount() == 2`. The default implementation delegates the decision to the tap condition passed in the constructor.

### onTouchStart

    protected void onTouchStart(TouchStartEvent evt)

  Invoked when a touch starts.

  Overrides:
    `onTouchStart` in class `TouchGestureRecognizer`

### onTouchMove

    protected void onTouchMove(TouchMoveEvent evt)

  Invoked when a finger touching the screen is moved.

  Overrides:
    `onTouchMove` in class `TouchGestureRecognizer`

### onTouchEnd

    protected void onTouchEnd(TouchEndEvent evt)

  Invoked when a finger touching the screen is lifted.

  Overrides:
    `onTouchEnd` in class `TouchGestureRecognizer`

### onTouchCancel

    protected void onTouchCancel(TouchCancelEvent evt)

  Invoked when a touch event is canceled.

  Overrides:
    `onTouchCancel` in class `TouchGestureRecognizer`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD