@Override
public void onClick(ClickEvent event) {
gotoPage(currentPage - 1);
}
}, ClickEvent.getType());
Tooltip leftPageTooltip = new Tooltip( GoogleDisplayerConstants.INSTANCE.googleTableDisplayer_gotoPreviousPage() );
leftPageTooltip.add(leftPageIcon);
Icon rightPageIcon = new Icon(IconType.ANGLE_RIGHT);
rightPageIcon.setIconSize(IconSize.LARGE);
rightPageIcon.getElement().getStyle().setCursor(Style.Cursor.POINTER);
rightPageIcon.sinkEvents(Event.ONCLICK);
rightPageIcon.addHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
gotoPage(currentPage + 1);
}
}, ClickEvent.getType());
Tooltip rightPageTooltip = new Tooltip( GoogleDisplayerConstants.INSTANCE.googleTableDisplayer_gotoNextPage() );
rightPageTooltip.add(rightPageIcon);
Icon firstPageIcon = new Icon(IconType.DOUBLE_ANGLE_LEFT);
firstPageIcon.setIconSize(IconSize.LARGE);
firstPageIcon.getElement().getStyle().setCursor(Style.Cursor.POINTER);
firstPageIcon.sinkEvents(Event.ONCLICK);
firstPageIcon.addHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
gotoPage(1);
}
}, ClickEvent.getType());
Tooltip firstPageTooltip = new Tooltip( GoogleDisplayerConstants.INSTANCE.googleTableDisplayer_gotoFirstPage() );
firstPageTooltip.add(firstPageIcon);
Icon lastPageIcon = new Icon(IconType.DOUBLE_ANGLE_RIGHT);
lastPageIcon.setIconSize(IconSize.LARGE);
lastPageIcon.getElement().getStyle().setCursor(Style.Cursor.POINTER);
lastPageIcon.sinkEvents(Event.ONCLICK);
lastPageIcon.addHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
gotoPage(numberOfPages);
}
}, ClickEvent.getType());
Tooltip lastPageTooltip = new Tooltip( GoogleDisplayerConstants.INSTANCE.googleTableDisplayer_gotoLastPage() );
lastPageTooltip.add(lastPageIcon);
Label totalPages = null;
if ( showTotalPagesHint ) {
totalPages = new Label(
GoogleDisplayerConstants.INSTANCE.googleTableDisplayer_pages(