use of org.activityinfo.ui.client.page.common.toolbar.ActionToolBar in project activityinfo by bedatadriven.
the class LockedPeriodGrid method createActionToolbar.
private void createActionToolbar() {
actionToolbar = new ActionToolBar(actionId -> {
switch(actionId) {
case UIActions.ADD:
eventBus.fireEvent(new StartCreateEvent());
break;
case UIActions.DELETE:
eventBus.fireEvent(new RequestDeleteEvent());
break;
case UIActions.SAVE:
eventBus.fireEvent(new UpdateEvent());
break;
case UIActions.DISCARD_CHANGES:
eventBus.fireEvent(new CancelUpdateEvent());
break;
}
});
actionToolbar.addDeleteButton();
actionToolbar.addCreateButton();
actionToolbar.addSaveSplitButton();
actionToolbar.setDeleteEnabled(false);
actionToolbar.setUpdateEnabled(false);
this.setTopComponent(actionToolbar);
}
use of org.activityinfo.ui.client.page.common.toolbar.ActionToolBar in project activityinfo by bedatadriven.
the class AbstractGridView method createToolBar.
protected void createToolBar() {
toolBar = new ActionToolBar(presenter);
setTopComponent(toolBar);
initToolBar();
toolBar.setDirty(false);
}
use of org.activityinfo.ui.client.page.common.toolbar.ActionToolBar in project activityinfo by bedatadriven.
the class ChartEditor method createToolBar.
private void createToolBar() {
toolBar = new ActionToolBar();
typeGroup = new ChartTypeGroup(eventBus);
toolBar.add(new LabelToolItem(I18N.CONSTANTS.chartType()));
toolBar.add(typeGroup.getButtons());
center.setTopComponent(toolBar);
}
Aggregations