protected void createTablePager() {
pagerPanel.clear();
pagerPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
Pagination pagination = new Pagination();
pagination.setSize(Pagination.PaginationSize.NORMAL);
pagination.setAlignment(Bootstrap.Pagination.LEFT.toString());
for (int i = getLeftMostPageNumber(); i <= getRightMostPageNumber(); i++) {
NavLink pageLink = new NavLink(Integer.toString(i));
final Integer _currentPage = Integer.valueOf(i);
if (currentPage != i) {
pageLink.setActive(false);
pageLink.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
gotoPage(_currentPage.intValue());
}
});
} else {
pageLink.setActive(true);
}
pagination.add(pageLink);
}
Icon leftPageIcon = new Icon(IconType.ANGLE_LEFT);
leftPageIcon.setIconSize(IconSize.LARGE);
leftPageIcon.getElement().getStyle().setCursor(Style.Cursor.POINTER);