|
|||||||||
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.pinch.PinchRecognizer
public class PinchRecognizer
Recognizes and fires pinch events.
Field Summary |
---|
Fields inherited from class com.maryanovsky.gwtutils.client.ui.touch.gestures.TouchGestureRecognizer |
---|
handlerManager |
Constructor Summary | |
---|---|
PinchRecognizer(Object eventSource)
Creates a new PinchRecognizer which will fire pinch events with
the specified source object. |
|
PinchRecognizer(Object pinchEventsSource,
Condition<? super PinchStartEvent> pinchCondition)
Creates a new PinchRecognizer which will fire pinch events with
the specified source object and consult the specified pinch condition
before doing so. |
|
PinchRecognizer(Object eventSource,
H touchEventsSource)
Creates a new PinchRecognizer which will fire pinch events with
the specified source object and use the specified source of touch events. |
|
PinchRecognizer(Object dragEventsSource,
H touchEventsSource,
Condition<? super PinchStartEvent> pinchCondition)
Creates a new PinchRecognizer which will fire events with the
specified source object, use the specified source of touch events and
consult the specified pinch condition before firing the pinch event(s). |
Method Summary | |
---|---|
HandlerRegistration |
addPinchCancelHandler(PinchCancelHandler handler)
Adds a pinch cancel handler. |
HandlerRegistration |
addPinchChangeHandler(PinchChangeHandler handler)
Adds a pinch change handler. |
HandlerRegistration |
addPinchEndHandler(PinchEndHandler handler)
Adds a pinch end handler. |
HandlerRegistration |
addPinchStartHandler(PinchStartHandler handler)
Adds a pinch start handler. |
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. |
protected boolean |
pinchCondition(PinchStartEvent evt)
Returns whether the specified PinchStartEvent and the pinch
events that follow it in the pinch gesture should be delivered to the
handlers. |
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 PinchRecognizer(Object eventSource)
PinchRecognizer
which will fire pinch events with
the specified source object.
public PinchRecognizer(Object eventSource, H touchEventsSource)
PinchRecognizer
which will fire pinch events with
the specified source object and use the specified source of touch events.
public PinchRecognizer(Object pinchEventsSource, Condition<? super PinchStartEvent> pinchCondition)
PinchRecognizer
which will fire pinch events with
the specified source object and consult the specified pinch condition
before doing so.
public PinchRecognizer(Object dragEventsSource, H touchEventsSource, Condition<? super PinchStartEvent> pinchCondition)
PinchRecognizer
which will fire events with the
specified source object, use the specified source of touch events and
consult the specified pinch condition before firing the pinch event(s).
See the documentation of pinchCondition(PinchStartEvent)
for
more information on the pinch condition.
Method Detail |
---|
public HandlerRegistration addPinchStartHandler(PinchStartHandler handler)
addPinchStartHandler
in interface HasPinchStartHandlers
public HandlerRegistration addPinchChangeHandler(PinchChangeHandler handler)
addPinchChangeHandler
in interface HasPinchChangeHandlers
public HandlerRegistration addPinchEndHandler(PinchEndHandler handler)
addPinchEndHandler
in interface HasPinchEndHandlers
public HandlerRegistration addPinchCancelHandler(PinchCancelHandler handler)
addPinchCancelHandler
in interface HasPinchCancelHandlers
protected boolean pinchCondition(PinchStartEvent evt)
PinchStartEvent
and the pinch
events that follow it in the pinch gesture should be delivered to the
handlers. This allows filtering pinch gestures to only those you really
want.
The default implementation delegates the decision to the pinch 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 |