createButton = new Button(I18N.get("New"), Images.DocumentNew);
exportButton = new Button(I18N.get("Export"), Images.XOfficeSpreadsheet);
printButton = new Button(I18N.get("Print"), Images.Printer);
listbox.addEventListener(Events.ON_SELECT, new EventListener() {
public void onEvent(Event event) throws Exception {
onSelect(listbox.getSelectedValue());
}
});
createButton.addEventListener(Events.ON_CLICK, new EventListener() {
public void onEvent(Event event) throws Exception {
onSelect(objectTableModel.newObject());
}
});
if (editor == null || objectTableModel.newObject() == null) {
createButton.setVisible(false);
}
exportButton.addEventListener(Events.ON_CLICK, new EventListener() {
public void onEvent(Event event) throws Exception {
exportTable();
}
});
printButton.addEventListener(Events.ON_CLICK, new EventListener() {
public void onEvent(Event event) throws Exception {
printTable();
}
});