public static class TouchScrollDelegate.TouchScrollHandler extends Object implements com.google.gwt.event.dom.client.TouchStartHandler
Constructor and Description |
---|
TouchScrollHandler()
Constructs a scroll handler.
|
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. |
Modifier and Type | Method and Description |
---|---|
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.
|
public TouchScrollHandler()
init(Widget, Element...)
before using the scroll handler.@Deprecated public 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.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.Copyright © 2018 Vaadin Ltd. All rights reserved.