|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.client.ui.TouchScrollDelegate.TouchScrollHandler
public static class TouchScrollDelegate.TouchScrollHandler
A helper class for making a widget scrollable. Uses native scrolling if supported by the browser, otherwise registers a touch start handler delegating to a TouchScrollDelegate instance.
| Constructor Summary | |
|---|---|
TouchScrollDelegate.TouchScrollHandler()
Constructs a scroll handler. |
|
TouchScrollDelegate.TouchScrollHandler(Widget widget,
Element... scrollables)
Deprecated. Use GWT#create(Class) and
init(Widget, Element...) instead of this
constructor to enable overriding. |
|
| Method Summary | |
|---|---|
void |
addElement(Element scrollable)
Registers the given element as scrollable. |
void |
debug(Element e)
|
protected Widget |
getWidget()
|
void |
init(Widget widget,
Element... scrollables)
Attaches the scroll handler to the widget. |
void |
onTouchStart(TouchStartEvent event)
|
void |
removeElement(Element scrollable)
Unregisters the given element as scrollable. |
protected boolean |
requiresDelegate()
Checks if a delegate for scrolling is required or if the native scrolling of the device should be used. |
void |
setElements(Element... scrollables)
Registers the given elements as scrollable, removing previously registered scrollables from this handler. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TouchScrollDelegate.TouchScrollHandler()
init(Widget, Element...) before using the scroll handler.
@Deprecated
public TouchScrollDelegate.TouchScrollHandler(Widget widget,
Element... scrollables)
GWT#create(Class) and
init(Widget, Element...) instead of this
constructor to enable overriding.
widget - The widget that contains scrollable elementsscrollables - The elements of the widget that should be scrollable.| Method Detail |
|---|
public void init(Widget widget,
Element... scrollables)
widget - The widget that contains scrollable elementsscrollables - The elements of the widget that should be scrollable.public void onTouchStart(TouchStartEvent event)
public void debug(Element e)
public void addElement(Element scrollable)
public void removeElement(Element scrollable)
public void setElements(Element... scrollables)
scrollables - The elements that should be scrollableprotected boolean requiresDelegate()
BrowserInfo.requiresTouchScrollDelegate(), override to change
the behavior.
protected Widget getWidget()
TouchScrollDelegate.TouchScrollHandler is connected to.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||