lastScrollPos = scrollable.getScrollPosition();
if (oldScrollPos >= lastScrollPos) {
return;
}
HasRows display = getDisplay();
if (display == null) {
return;
}
int maxScrollTop = scrollable.getWidget().getOffsetHeight()
- scrollable.getOffsetHeight();
if (lastScrollPos >= maxScrollTop) {
// We are near the end, so increase the page size.
int newPageSize = Math.min(display.getVisibleRange().getLength()
+ incrementSize, display.getRowCount());
//all children will be replaced, ensure to destroy existing tooltip in order to avoid ghost
// tooltips
GQuery.$(".tooltipable", (Widget) display).as(Tooltip.Tooltip).destroy();
display.setVisibleRange(0, newPageSize);
}
}
});
}