* @param pageSize the page size
*/
public PagingToolBar(final int pageSize) {
this.pageSize = pageSize;
first = new Button();
first.addListener(Events.Disable, listener);
first.addListener(Events.Enable, listener);
first.addSelectionListener(new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent ce) {
first();
}
});
prev = new Button();
prev.addListener(Events.Disable, listener);
prev.addListener(Events.Enable, listener);
prev.addSelectionListener(new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent ce) {
previous();
}
});
next = new Button();
next.addListener(Events.Disable, listener);
next.addListener(Events.Enable, listener);
next.addSelectionListener(new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent ce) {
next();
}
});
last = new Button();
last.addListener(Events.Disable, listener);
last.addListener(Events.Enable, listener);
last.addSelectionListener(new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent ce) {
last();
}
});
refresh = new Button();
refresh.addSelectionListener(new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent ce) {
refresh();
}
});