use of org.activityinfo.ui.client.page.common.toolbar.ActionToolBar in project activityinfo by bedatadriven.
the class DbUserEditor method createToolBar.
private void createToolBar() {
toolBar = new ActionToolBar(this);
toolBar.addSaveButton();
toolBar.addButton(UIActions.ADD, I18N.CONSTANTS.addUser(), IconImageBundle.ICONS.addUser());
toolBar.addButton(UIActions.EDIT, I18N.CONSTANTS.edit(), IconImageBundle.ICONS.edit());
toolBar.addButton(UIActions.DELETE, I18N.CONSTANTS.delete(), IconImageBundle.ICONS.deleteUser());
toolBar.addButton(UIActions.EXPORT, I18N.CONSTANTS.export(), IconImageBundle.ICONS.excel());
toolBar.addButton(UIActions.MAILING_LIST, I18N.CONSTANTS.CopyAddressToClipBoard(), IconImageBundle.ICONS.dataEntry());
setTopComponent(toolBar);
}
use of org.activityinfo.ui.client.page.common.toolbar.ActionToolBar in project activityinfo by bedatadriven.
the class DbListPage method createToolBar.
private void createToolBar() {
toolBar = new ActionToolBar();
toolBar.addButton(UIActions.ADD, I18N.CONSTANTS.newDatabase(), IconImageBundle.ICONS.addDatabase());
toolBar.addEditButton(IconImageBundle.ICONS.editDatabase());
toolBar.addButton(UIActions.RENAME, I18N.CONSTANTS.renameDatabase(), IconImageBundle.ICONS.database());
toolBar.addDeleteButton();
toolBar.setListener(presenter);
this.setTopComponent(toolBar);
}
use of org.activityinfo.ui.client.page.common.toolbar.ActionToolBar in project activityinfo by bedatadriven.
the class DataEntryPage method createToolBar.
private ActionToolBar createToolBar() {
toolBar = new ActionToolBar(this);
groupingComboBox = new GroupingComboBox(dispatcher);
groupingComboBox.withSelectionListener(event -> eventBus.fireEvent(new NavigationEvent(NavigationHandler.NAVIGATION_REQUESTED, currentPlace.copy().setGrouping(groupingComboBox.getGroupingModel()))));
toolBar.add(new Label(I18N.CONSTANTS.grouping()));
toolBar.add(groupingComboBox);
toolBar.addButton(UIActions.ADD, I18N.CONSTANTS.newSite(), IconImageBundle.ICONS.add());
toolBar.addButton(UIActions.EDIT, I18N.CONSTANTS.edit(), IconImageBundle.ICONS.edit());
toolBar.addDeleteButton(I18N.CONSTANTS.deleteSite());
toolBar.add(new SeparatorToolItem());
toolBar.add(new SeparatorToolItem());
toolBar.addImportButton();
toolBar.addExcelExportButton();
toolBar.addPrintButton();
return toolBar;
}
use of org.activityinfo.ui.client.page.common.toolbar.ActionToolBar in project activityinfo by bedatadriven.
the class MonthlyReportsPanel method addToolBar.
private void addToolBar() {
toolBar = new ActionToolBar();
toolBar.setListener(this);
toolBar.addSaveSplitButton();
toolBar.add(new LabelToolItem(I18N.CONSTANTS.month() + ": "));
monthCombo = new MappingComboBox<>();
monthCombo.setEditable(false);
monthCombo.addListener(Events.Select, new Listener<FieldEvent>() {
@Override
public void handleEvent(FieldEvent be) {
selectStartMonth(monthCombo.getMappedValue());
}
});
DateWrapper today = new DateWrapper();
DateTimeFormat monthFormat = DateTimeFormat.getFormat("MMM yyyy");
for (int year = today.getFullYear() + 2; year != today.getFullYear() - 3; --year) {
for (int month = 12; month != 0; --month) {
DateWrapper d = new DateWrapper(year, month, 1);
Month m = new Month(year, month);
monthCombo.add(m, monthFormat.format(d.asDate()));
}
}
toolBar.add(monthCombo);
toolBar.setDirty(false);
setTopComponent(toolBar);
}
use of org.activityinfo.ui.client.page.common.toolbar.ActionToolBar in project activityinfo by bedatadriven.
the class AttachmentsTab method createToolBar.
public void createToolBar() {
toolBar = new ActionToolBar();
toolBar.addUploadButton();
toolBar.add(new SeparatorToolItem());
toolBar.addDeleteButton();
toolBar.setListener(presenter);
toolBar.setUploadEnabled(false);
toolBar.setDeleteEnabled(false);
}
Aggregations