|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.maryanovsky.gwtutils.client.ui.touch.gestures.TouchGestureRecognizer
com.maryanovsky.gwtutils.client.ui.touch.gestures.mftap.MultiFingerTapRecognizer
public class MultiFingerTapRecognizer
Recognizes and fires multi-finger, single-tap events.
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 |
---|
public MultiFingerTapRecognizer(Object multiFingerTapEventSource)
MultiFingerTapRecognizer
which will fire
multi-finger tap events with the specified source object.
public MultiFingerTapRecognizer(Object multiFingerTapEventSource, H touchEventsSource)
MultiFingerTapRecognizer
which will fire
multi-finger tap events with the specified source object and use the
specified source of touch events.
public MultiFingerTapRecognizer(Object multiFingerTapEventSource, Condition<? super MultiFingerTapEvent> multiFingerTapCondition)
MultiFingerTapRecognizer
which will fire
multi-finger tap events with the specified source object and consult the
specified tap condition before doing so.
public MultiFingerTapRecognizer(Object multiFingerTapEventSource, H touchEventsSource, Condition<? super MultiFingerTapEvent> multiFingerTapCondition)
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 |
---|
public HandlerRegistration addMultiFingerTapHandler(MultiFingerTapHandler handler)
addMultiFingerTapHandler
in interface HasMultiFingerTapHandlers
protected boolean multiFingerTapCondition(MultiFingerTapEvent evt)
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.
protected void onTouchStart(TouchStartEvent evt)
onTouchStart
in class TouchGestureRecognizer
protected void onTouchMove(TouchMoveEvent evt)
onTouchMove
in class TouchGestureRecognizer
protected void onTouchEnd(TouchEndEvent evt)
onTouchEnd
in class TouchGestureRecognizer
protected void onTouchCancel(TouchCancelEvent evt)
onTouchCancel
in class TouchGestureRecognizer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |