Search in sources :

Example 1 with SeparatorToolItem

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);
}
Also used : Button(com.extjs.gxt.ui.client.widget.button.Button) SeparatorToolItem(com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem) SeparatorMenuItem(com.extjs.gxt.ui.client.widget.menu.SeparatorMenuItem) MenuItem(com.extjs.gxt.ui.client.widget.menu.MenuItem) Menu(com.extjs.gxt.ui.client.widget.menu.Menu) SeparatorMenuItem(com.extjs.gxt.ui.client.widget.menu.SeparatorMenuItem)

Example 2 with SeparatorToolItem

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;
}
Also used : SeparatorToolItem(com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem) ActionToolBar(org.activityinfo.ui.client.page.common.toolbar.ActionToolBar) GroupingComboBox(org.activityinfo.ui.client.page.entry.grouping.GroupingComboBox)

Example 3 with SeparatorToolItem

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);
}
Also used : SeparatorToolItem(com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem) ActionToolBar(org.activityinfo.ui.client.page.common.toolbar.ActionToolBar)

Aggregations

SeparatorToolItem (com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem)3 ActionToolBar (org.activityinfo.ui.client.page.common.toolbar.ActionToolBar)2 Button (com.extjs.gxt.ui.client.widget.button.Button)1 Menu (com.extjs.gxt.ui.client.widget.menu.Menu)1 MenuItem (com.extjs.gxt.ui.client.widget.menu.MenuItem)1 SeparatorMenuItem (com.extjs.gxt.ui.client.widget.menu.SeparatorMenuItem)1 GroupingComboBox (org.activityinfo.ui.client.page.entry.grouping.GroupingComboBox)1