public class DragGestureRecognizer extends AbstractGestureRecognizer
Modifier and Type | Class and Description |
---|---|
static class |
DragGestureRecognizer.CellDragGestureRecognizer<T> |
static class |
DragGestureRecognizer.DragGestureCancelEvent |
static class |
DragGestureRecognizer.DragGestureEndEvent |
static class |
DragGestureRecognizer.DragGestureMoveEvent |
static class |
DragGestureRecognizer.DragGestureStartEvent |
AbstractGestureRecognizer.ExtraTouchBehavior
Modifier and Type | Field and Description |
---|---|
protected boolean |
dragging |
pointerEventsSupport
Constructor and Description |
---|
DragGestureRecognizer() |
DragGestureRecognizer(int minMoveDistance) |
DragGestureRecognizer(int minMoveDistance,
AbstractGestureRecognizer.ExtraTouchBehavior extraTouchBehavior) |
Modifier and Type | Method and Description |
---|---|
boolean |
handle(NativeEvent event)
Takes a browser event, and checks to see if it should decipher a gesture from it.
|
protected boolean |
handleMousePointers()
Returns true if the DragGR can handle mouse pointers.
|
protected void |
onCancel(List<TouchData> touches)
Indicates that one or more touches have been canceled by the browser or by the gesture itself being canceled
(see #cancel).
|
protected void |
onEnd(List<TouchData> touches)
Indicates that one or more touches have ended.
|
protected void |
onMove(List<TouchData> touches)
Indicates that on or more touches are moving
|
protected boolean |
onStart(TouchData startedTouch)
Indicates that a touch has started, giving the gesture the chance to exclusively handle this touch as it moves.
|
cancel, fireEvent, getTouches, handleCancel, handleEnd, handleMove, handlePreventDefault, handleStart, setCaptured, setDelegate, setInterest, start
public DragGestureRecognizer()
public DragGestureRecognizer(int minMoveDistance)
public DragGestureRecognizer(int minMoveDistance, AbstractGestureRecognizer.ExtraTouchBehavior extraTouchBehavior)
public boolean handle(NativeEvent event)
GestureRecognizer
Takes a browser event, and checks to see if it should decipher a gesture from it.
Callers of this are expected to do their own vetting to decide if the given event should be handled by this gesture - for example, if a cell accepts a tap on one part of it and a longpress on another, the cell should determine where the touch events occur and send to the right recognizer accordingly.
handle
in interface GestureRecognizer
handle
in class AbstractGestureRecognizer
event
- the browser event to read for a gesture.protected boolean handleMousePointers()
protected boolean onStart(TouchData startedTouch)
AbstractGestureRecognizer
onStart
in class AbstractGestureRecognizer
startedTouch
- the touch that has begunprotected void onMove(List<TouchData> touches)
AbstractGestureRecognizer
onMove
in class AbstractGestureRecognizer
protected void onEnd(List<TouchData> touches)
AbstractGestureRecognizer
onEnd
in class AbstractGestureRecognizer
touches
- data for the now-ended touches (as opposed to #getTouches which no longer has those entries)protected void onCancel(List<TouchData> touches)
AbstractGestureRecognizer
onCancel
in class AbstractGestureRecognizer
touches
- data for the now-canceled touches (as opposed to #getTouches which no longer has those entries)Copyright © 2018. All rights reserved.