public class SwipeRecognizer extends Object implements TouchHandler
Constructor and Description |
---|
SwipeRecognizer(com.google.gwt.event.shared.HasHandlers source)
construct a swipe recognizer
|
SwipeRecognizer(com.google.gwt.event.shared.HasHandlers source,
int minDistance)
construct a swipe recognizer
|
SwipeRecognizer(com.google.gwt.event.shared.HasHandlers source,
int minDistance,
int threshold)
construct a swipe recognizer
|
Modifier and Type | Method and Description |
---|---|
protected EventPropagator |
getEventPropagator() |
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 |
log(String l) |
void |
onTouchCanceled(TouchCancelEvent event)
Called when a touch cancel event is fired.
|
void |
onTouchEnd(TouchEndEvent event)
Called when a touch end event is fired.
|
void |
onTouchMove(TouchMoveEvent event)
Called when a touch end move is fired.
|
void |
onTouchStart(TouchStartEvent event)
onTouchStart
|
protected void |
setEventPropagator(EventPropagator eventPropagator) |
public SwipeRecognizer(com.google.gwt.event.shared.HasHandlers source)
source
- the source to fire events onpublic SwipeRecognizer(com.google.gwt.event.shared.HasHandlers source, int minDistance)
source
- the source to fire events onminDistance
- the minimum distance to cover before this counts as a swipepublic SwipeRecognizer(com.google.gwt.event.shared.HasHandlers source, int minDistance, int threshold)
source
- the source to fire events onminDistance
- the minimum distance to cover before this counts as a swipethreshold
- the initial threshold before swipe start is firedpublic void onTouchStart(TouchStartEvent event)
TouchStartHandler
onTouchStart
onTouchStart
in interface TouchStartHandler
event
- a TouchStartEvent
object.public void onTouchMove(TouchMoveEvent event)
TouchMoveHandler
onTouchMove
in interface TouchMoveHandler
event
- the TouchMoveEvent
that was firedpublic void log(String l)
public void onTouchEnd(TouchEndEvent event)
TouchEndHandler
onTouchEnd
in interface TouchEndHandler
event
- the TouchEndEvent
that was firedpublic void onTouchCanceled(TouchCancelEvent event)
TouchCancelHandler
onTouchCanceled
in interface TouchCancelHandler
event
- the TouchCancelEvent
that was firedpublic int getThreshold()
public int getMinDistance()
protected EventPropagator getEventPropagator()
protected void setEventPropagator(EventPropagator eventPropagator)
Copyright © 2016 Magnolia International Ltd.. All rights reserved.