imgPageFirst = new Image();
imgPagePrev = new Image();
imgPageNext = new Image();
imgPageLast = new Image();
btnPageFirst = new PushButton(imgPageFirst, this);
btnPagePrev = new PushButton(imgPagePrev, this);
btnPageNext = new PushButton(imgPageNext, this);
btnPageLast = new PushButton(imgPageLast, this);
// prev buttons (divs)
addButton(btnPageFirst, "First Page");
addButton(btnPagePrev, "Previous Page");
// separator
split = new Image(ListingNavStyles.resources().split());
split.setStyleName(ToolbarStyles.css().separator());
add(split);
// Page x of y
tbPage.addKeyUpHandler(this);
tbPage.addChangeHandler(this);
tbPage.setMaxLength(4);
tbPage.setStyleName(ListingNavStyles.css().tbPage());
pageXofY = new FlowPanel();
pageXofY.setStyleName(ListingNavStyles.css().page());
pageXofY.add(lblPagePre);
pageXofY.add(tbPage);
pageXofY.add(lblPagePost);
add(pageXofY);
// separator
split = new Image(ListingNavStyles.resources().split());
split.setStyleName(ToolbarStyles.css().separator());
add(split);
// next buttons (divs)
addButton(btnPageNext, "Next Page");
addButton(btnPageLast, "Last Page");
// show refresh button?
if(showRefreshBtn) {
imgRefresh = new Image(ListingNavStyles.resources().refresh());
btnRefresh = new PushButton(imgRefresh, this);
// separator
split = new Image(ListingNavStyles.resources().split());
split.setStyleName(ToolbarStyles.css().separator());
add(split);
addButton(btnRefresh, "Refresh");
}
// show add button?
if(addRowHandler != null) {
// imgAdd = imageBundle.add().createImage();
final String title = "Add " + listingElementName;
btnAdd = new PushButton(title, this);
if(showRefreshBtn) {
// separator
split = new Image(ListingNavStyles.resources().split());
split.setStyleName(ToolbarStyles.css().separator());
add(split);