pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 0,
true) {
private int pageSize = 10;
@Override
public int getPageSize() {
return pageSize;
}
@Override
public void previousPage() {
if (getDisplay() != null) {
Range range = getDisplay().getVisibleRange();
setPageStart(range.getStart() - getPageSize());
}
}
@Override
public void setPageStart(int index) {
if (getDisplay() != null) {
Range range = getDisplay().getVisibleRange();
int displayPageSize = getPageSize();
if (isRangeLimited() && getDisplay().isRowCountExact()) {
displayPageSize = Math.min(getPageSize(), getDisplay()
.getRowCount() - index);
}
index = Math.max(0, index);
if (index != range.getStart()) {
getDisplay().setVisibleRange(index, displayPageSize);
}
}
}
@Override
public void nextPage() {
if (getDisplay() != null) {
Range range = getDisplay().getVisibleRange();
setPageStart(range.getStart() + getPageSize());
}
}
};
pager.setRangeLimited(true);
pager.setDisplay(cellTable);
pager.setPageSize(10);