|
GWT 2.4.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.touch.client.TouchScroller
public class TouchScroller
Adds touch based scrolling to a scroll panel.
Touch based scrolling is only supported on devices that support touch events and do not implement native touch based scrolling.
| Constructor Summary | |
|---|---|
protected |
TouchScroller()
Construct a new TouchScroller. |
| Method Summary | |
|---|---|
static TouchScroller |
createIfSupported()
Return a new TouchScroller. |
static TouchScroller |
createIfSupported(HasScrolling widget)
Return a new TouchScroller that augments the specified scrollable
widget if supported, and null otherwise. |
Momentum |
getMomentum()
Get the Momentum that controls scrolling after the user completes a
gesture. |
HasScrolling |
getTargetWidget()
Get the target HasScrolling widget that this scroller affects. |
protected Touch |
getTouchFromEvent(TouchEvent<?> event)
Get touch from event. |
static boolean |
isSupported()
Runtime check for whether touch scrolling is supported in this browser. |
protected void |
onDragEnd(TouchEvent<?> event)
Called when the object's drag sequence is complete. |
protected void |
onDragMove(TouchEvent<?> event)
Called when the object has been dragged to a new position. |
protected void |
onDragStart(TouchEvent<?> event)
Called when the object has started dragging. |
protected void |
onTouchCancel(TouchEvent<?> event)
Called when the user cancels a touch. |
protected void |
onTouchEnd(TouchEvent<?> event)
Called when the user releases a touch. |
protected void |
onTouchMove(TouchEvent<?> event)
Called when the user moves a touch. |
protected void |
onTouchStart(TouchEvent<?> event)
Called when the user starts a touch. |
void |
setMomentum(Momentum momentum)
Set the Momentum that controls scrolling after the user completes a
gesture. |
void |
setTargetWidget(HasScrolling widget)
Set the target HasScrolling widget that this scroller affects. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected TouchScroller()
TouchScroller. This constructor should be called
using the static method createIfSupported().
createIfSupported()| Method Detail |
|---|
public static TouchScroller createIfSupported()
TouchScroller.
TouchScroller if supported, and null otherwisepublic static TouchScroller createIfSupported(HasScrolling widget)
TouchScroller that augments the specified scrollable
widget if supported, and null otherwise.
widget - the scrollable widget
TouchScroller if supported, and null otherwisepublic static boolean isSupported()
public Momentum getMomentum()
Momentum that controls scrolling after the user completes a
gesture.
Momentum, or null if disabledpublic HasScrolling getTargetWidget()
HasScrolling widget that this scroller affects.
public void setMomentum(Momentum momentum)
Momentum that controls scrolling after the user completes a
gesture.
momentum - the scrolling Momentum, or null to disablepublic void setTargetWidget(HasScrolling widget)
HasScrolling widget that this scroller affects.
widget - the target widget, or null to disbaleprotected Touch getTouchFromEvent(TouchEvent<?> event)
event - the event
protected void onDragEnd(TouchEvent<?> event)
event - the touch eventprotected void onDragMove(TouchEvent<?> event)
event - the touch eventprotected void onDragStart(TouchEvent<?> event)
event - the touch eventprotected void onTouchCancel(TouchEvent<?> event)
event - the touch eventprotected void onTouchEnd(TouchEvent<?> event)
event - the touch eventprotected void onTouchMove(TouchEvent<?> event)
event - the touch eventprotected void onTouchStart(TouchEvent<?> event)
event - the touch event
|
GWT 2.4.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||