moduleList.addColumn(name, "Name");
moduleList.addColumn(slot, "Slot");
ToolStrip moduleTools = new ToolStrip();
ToolButton addBtn = new ToolButton(Console.CONSTANTS.common_label_add(), new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
presenter.launchNewModuleDialogue();
}
});
addBtn.ensureDebugId(Console.DEBUG_CONSTANTS.debug_label_add_eESubsystemView());
moduleTools.addToolButtonRight(addBtn);
ToolButton button = new ToolButton(Console.CONSTANTS.common_label_remove(), new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
final Module module = ((SingleSelectionModel<Module>) moduleList.getSelectionModel()).getSelectedObject();
if(null==module) return;
Feedback.confirm(
Console.MESSAGES.deleteTitle("Module"),
Console.MESSAGES.deleteConfirm("Module"),
new Feedback.ConfirmationHandler() {
@Override
public void onConfirmation(boolean isConfirmed) {
if(isConfirmed)
{
presenter.onRemoveModule(form.getEditedEntity(), module);
}
}
});
}
});
button.ensureDebugId(Console.DEBUG_CONSTANTS.debug_label_remove_eESubsystemView());
moduleTools.addToolButtonRight(button);
VerticalPanel modulePanel = new VerticalPanel();
modulePanel.setStyleName("fill-layout-width");