public class AutoScroller extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
AutoScroller.AutoScrollerCallback
Callback that notifies when the cursor is on top of a new row or column
because of the automatic scrolling.
|
static class |
AutoScroller.ScrollAxis |
| Constructor and Description |
|---|
AutoScroller(Grid<?> grid)
Creates a new instance for scrolling the given grid.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getFrozenColumnsWidth() |
int |
getScrollArea()
Returns the size of the auto scroll area in pixels.
|
void |
setScrollArea(int px)
Set the auto scroll area height or width depending on the scrolling axis.
|
void |
start(com.google.gwt.dom.client.NativeEvent startEvent,
AutoScroller.ScrollAxis scrollAxis,
AutoScroller.AutoScrollerCallback callback)
Starts the automatic scrolling detection.
|
void |
stop()
Stops the automatic scrolling.
|
public AutoScroller(Grid<?> grid)
grid - the grid to auto scrollpublic void start(com.google.gwt.dom.client.NativeEvent startEvent,
AutoScroller.ScrollAxis scrollAxis,
AutoScroller.AutoScrollerCallback callback)
startEvent - the event that starts the automatic scrollscrollAxis - the axis along which the scrolling should happencallback - the callback for getting info about the automatic scrollingpublic void stop()
public void setScrollArea(int px)
Defaults to 100px.
px - the pixel height/width for the auto scroll area depending on
directionpublic int getScrollArea()
Defaults to 100px.
public double getFrozenColumnsWidth()
Copyright © 2018 Vaadin Ltd. All rights reserved.