public class LongTapRecognizer extends Object implements TouchHandler
Modifier and Type | Class and Description |
---|---|
protected static class |
LongTapRecognizer.State |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_DISTANCE |
static int |
DEFAULT_WAIT_TIME_IN_MS |
protected LongTapRecognizer.State |
state |
Constructor and Description |
---|
LongTapRecognizer(com.google.gwt.event.shared.HasHandlers source)
Construct a LongTapRecognizer with that fires on one finger after 1.5s
|
LongTapRecognizer(com.google.gwt.event.shared.HasHandlers source,
int numberOfFingers)
Construct a LongTapRecognizer with that after 1.5s
|
LongTapRecognizer(com.google.gwt.event.shared.HasHandlers source,
int numberOfFingers,
int time)
Construct a LongTapRecognizer
|
LongTapRecognizer(com.google.gwt.event.shared.HasHandlers source,
int numberOfFingers,
int time,
int maxDistance)
Construct a LongTapRecognizer
|
Modifier and Type | Method and Description |
---|---|
protected EventPropagator |
getEventPropagator() |
protected TimerExecutor |
getTimerExecutor() |
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 |
reset() |
protected void |
setEventPropagator(EventPropagator eventPropagator)
set the event propagator that is used by the recognizer - used for testing
|
protected void |
setTimerExecutor(TimerExecutor timerExecutor)
set the timer executor - used for testing...
|
public static final int DEFAULT_WAIT_TIME_IN_MS
public static final int DEFAULT_MAX_DISTANCE
protected LongTapRecognizer.State state
public LongTapRecognizer(com.google.gwt.event.shared.HasHandlers source)
source
- the source on which to fire events onpublic LongTapRecognizer(com.google.gwt.event.shared.HasHandlers source, int numberOfFingers)
source
- source the source on which to fire events onnumberOfFingers
- the number of fingers to detectpublic LongTapRecognizer(com.google.gwt.event.shared.HasHandlers source, int numberOfFingers, int time)
source
- the source on which to fire events onnumberOfFingers
- the number of fingers that should be detectedtime
- the time the fingers need to touchpublic LongTapRecognizer(com.google.gwt.event.shared.HasHandlers source, int numberOfFingers, int time, int maxDistance)
source
- the source on which to fire events onnumberOfFingers
- the number of fingers that should be detectedtime
- the time the fingers need to touchmaxDistance
- the maximum distance each finger is allowed to movepublic 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 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 firedprotected void setTimerExecutor(TimerExecutor timerExecutor)
timerExecutor
- the timer executor to useprotected void setEventPropagator(EventPropagator eventPropagator)
eventPropagator
- protected TimerExecutor getTimerExecutor()
protected void reset()
protected EventPropagator getEventPropagator()
Copyright © 2021 Magnolia International Ltd.. All rights reserved.