|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.terminal.gwt.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(com.google.gwt.user.client.ui.Widget widget,
com.google.gwt.dom.client.Element... scrollables)
Deprecated. Use GWT.create(Class) and
init(Widget, Element...) instead of this
constructor to enable overriding. |
Method Summary | |
---|---|
void |
addElement(com.google.gwt.dom.client.Element scrollable)
Registers the given element as scrollable. |
void |
debug(com.google.gwt.dom.client.Element e)
|
protected com.google.gwt.user.client.ui.Widget |
getWidget()
|
void |
init(com.google.gwt.user.client.ui.Widget widget,
com.google.gwt.dom.client.Element... scrollables)
Attaches the scroll handler to the widget. |
void |
onTouchStart(com.google.gwt.event.dom.client.TouchStartEvent event)
|
void |
removeElement(com.google.gwt.dom.client.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(com.google.gwt.dom.client.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(com.google.gwt.user.client.ui.Widget widget, com.google.gwt.dom.client.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(com.google.gwt.user.client.ui.Widget widget, com.google.gwt.dom.client.Element... scrollables)
widget
- The widget that contains scrollable elementsscrollables
- The elements of the widget that should be scrollable.public void onTouchStart(com.google.gwt.event.dom.client.TouchStartEvent event)
onTouchStart
in interface com.google.gwt.event.dom.client.TouchStartHandler
public void debug(com.google.gwt.dom.client.Element e)
public void addElement(com.google.gwt.dom.client.Element scrollable)
public void removeElement(com.google.gwt.dom.client.Element scrollable)
public void setElements(com.google.gwt.dom.client.Element... scrollables)
scrollables
- The elements that should be scrollableprotected boolean requiresDelegate()
BrowserInfo.requiresTouchScrollDelegate()
, override to change
the behavior.
protected com.google.gwt.user.client.ui.Widget getWidget()
TouchScrollDelegate.TouchScrollHandler
is connected to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |