use of com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem in project activityinfo by bedatadriven.
the class DbEditor method initToolBar.
private void initToolBar() {
toolBar.addSaveButton();
SelectionListener<MenuEvent> listener = new SelectionListener<MenuEvent>() {
@Override
public void componentSelected(MenuEvent ce) {
onNew(ce.getItem().getItemId());
}
};
newMenu = new DbEditorMenu(listener);
Button newButtonMenu = new Button(I18N.CONSTANTS.newText(), IconImageBundle.ICONS.add());
newButtonMenu.setMenu(newMenu.asMenu());
toolBar.add(newButtonMenu);
toolBar.add(new SeparatorMenuItem());
toolBar.addButton(UIActions.EDIT, I18N.CONSTANTS.openFormDesigner(), IconImageBundle.ICONS.edit());
toolBar.addButton(UIActions.OPEN_TABLE, I18N.CONSTANTS.openTable(), IconImageBundle.ICONS.table());
toolBar.addDeleteButton();
toolBar.add(new SeparatorToolItem());
toolBar.addImportButton();
Menu exportMenu = new Menu();
exportMenu.add(new MenuItem("Export complete database (classic)", IconImageBundle.ICONS.excel(), new SelectionListener<MenuEvent>() {
@Override
public void componentSelected(MenuEvent menuEvent) {
exportFullDatabase();
}
}));
exportMenu.add(new MenuItem("Export complete database (beta)", IconImageBundle.ICONS.excel(), new SelectionListener<MenuEvent>() {
@Override
public void componentSelected(MenuEvent menuEvent) {
exportFullDatabaseBeta();
}
}));
exportMenu.add(new SeparatorMenuItem());
exportMenu.add(new MenuItem("Export selected form as XLSForm", IconImageBundle.ICONS.excel(), new SelectionListener<MenuEvent>() {
@Override
public void componentSelected(MenuEvent menuEvent) {
exportFormAsXlsForm();
}
}));
exportMenu.add(new SeparatorMenuItem());
exportMenu.add(new MenuItem("Export audit log", IconImageBundle.ICONS.excel(), new SelectionListener<MenuEvent>() {
@Override
public void componentSelected(MenuEvent menuEvent) {
exportAuditLog();
}
}));
Button exportButton = new Button(I18N.CONSTANTS.export(), IconImageBundle.ICONS.excel());
exportButton.setMenu(exportMenu);
toolBar.add(exportButton);
}
use of com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem 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 com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem 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