public class ScrollGestureRecognizer extends DragGestureRecognizer
Modifier and Type | Class and Description |
---|---|
static class |
ScrollGestureRecognizer.ScrollDirection |
static class |
ScrollGestureRecognizer.ScrollGestureCancelEvent |
static class |
ScrollGestureRecognizer.ScrollGestureEndEvent |
static class |
ScrollGestureRecognizer.ScrollGestureMoveEvent |
DragGestureRecognizer.CellDragGestureRecognizer<T>, DragGestureRecognizer.DragGestureCancelEvent, DragGestureRecognizer.DragGestureEndEvent, DragGestureRecognizer.DragGestureMoveEvent, DragGestureRecognizer.DragGestureStartEvent
AbstractGestureRecognizer.ExtraTouchBehavior
Modifier and Type | Field and Description |
---|---|
protected AbstractGestureRecognizer.ExtraTouchBehavior |
extraTouchBehavior |
protected double |
heavyFactor
Used to tweak how "heavy" the scrolling is.
|
protected Point |
initialPosition |
protected Stack<com.sencha.gxt.core.client.gestures.ScrollGestureRecognizer.TemporalPoint> |
lastTouchPoints
Stack keeping track of all TemporalPoints in the Gesture
|
protected com.sencha.gxt.core.client.gestures.ScrollGestureRecognizer.MomentumCommand |
momentumCommand
Command used to animate the scrolling after gesture ends
|
dragging
pointerEventsSupport
Constructor and Description |
---|
ScrollGestureRecognizer(Element scrollElement) |
ScrollGestureRecognizer(Element scrollElement,
ScrollGestureRecognizer.ScrollDirection direction) |
ScrollGestureRecognizer(Element scrollElement,
ScrollGestureRecognizer.ScrollDirection direction,
AbstractGestureRecognizer.ExtraTouchBehavior extraTouchBehavior) |
Modifier and Type | Method and Description |
---|---|
protected com.sencha.gxt.core.client.gestures.ScrollGestureRecognizer.Velocity |
calculateEndVelocity()
Calculates the velocity at the end of touchmove events
|
void |
cancel()
Ends recognition of the gesture, and fires any cancel events that apply.
|
protected void |
fireEvent(<any> event) |
protected ScrollGestureRecognizer.ScrollDirection |
getDirection() |
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 |
onInitialPosition(Element scrollElement) |
protected void |
onMove(List<TouchData> touches)
Indicates that on or more touches are moving
|
protected void |
onScrollCancel(List<TouchData> event) |
protected void |
onScrollEnd(List<TouchData> event) |
protected void |
onScrollMove(List<TouchData> touches) |
protected void |
onScrollMoveHorizontal(Element scrollElement,
TouchData touch) |
protected void |
onScrollMoveVertical(Element scrollElement,
TouchData touch) |
protected boolean |
onStart(TouchData startedTouch)
Indicates that a touch has started, giving the gesture the chance to exclusively handle this touch as it moves.
|
void |
setDelegate(HasHandlers eventDelegate)
Sets delegate to receive Gesture events
|
handle, handleMousePointers
getTouches, handleCancel, handleEnd, handleMove, handlePreventDefault, handleStart, setCaptured, setInterest, start
protected double heavyFactor
protected final Stack<com.sencha.gxt.core.client.gestures.ScrollGestureRecognizer.TemporalPoint> lastTouchPoints
protected com.sencha.gxt.core.client.gestures.ScrollGestureRecognizer.MomentumCommand momentumCommand
protected Point initialPosition
protected AbstractGestureRecognizer.ExtraTouchBehavior extraTouchBehavior
public ScrollGestureRecognizer(Element scrollElement)
public ScrollGestureRecognizer(Element scrollElement, ScrollGestureRecognizer.ScrollDirection direction)
public ScrollGestureRecognizer(Element scrollElement, ScrollGestureRecognizer.ScrollDirection direction, AbstractGestureRecognizer.ExtraTouchBehavior extraTouchBehavior)
public void cancel()
GestureRecognizer
cancel
in interface GestureRecognizer
cancel
in class AbstractGestureRecognizer
protected ScrollGestureRecognizer.ScrollDirection getDirection()
public void setDelegate(HasHandlers eventDelegate)
GestureRecognizer
setDelegate
in interface GestureRecognizer
setDelegate
in class AbstractGestureRecognizer
eventDelegate
- the event handler delegateprotected com.sencha.gxt.core.client.gestures.ScrollGestureRecognizer.Velocity calculateEndVelocity()
protected boolean onStart(TouchData startedTouch)
AbstractGestureRecognizer
onStart
in class DragGestureRecognizer
startedTouch
- the touch that has begunprotected void onMove(List<TouchData> touches)
AbstractGestureRecognizer
onMove
in class DragGestureRecognizer
protected void onEnd(List<TouchData> touches)
AbstractGestureRecognizer
onEnd
in class DragGestureRecognizer
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 DragGestureRecognizer
touches
- data for the now-canceled touches (as opposed to #getTouches which no longer has those entries)protected void fireEvent(<any> event)
fireEvent
in class AbstractGestureRecognizer
protected void onInitialPosition(Element scrollElement)
protected void onScrollMoveVertical(Element scrollElement, TouchData touch)
protected void onScrollMoveHorizontal(Element scrollElement, TouchData touch)
Copyright © 2018. All rights reserved.