Search in sources :

Example 1 with ActionToolBar

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

Example 2 with ActionToolBar

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

Example 3 with ActionToolBar

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;
}
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 4 with ActionToolBar

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);
}
Also used : LabelToolItem(com.extjs.gxt.ui.client.widget.toolbar.LabelToolItem) Month(org.activityinfo.model.type.time.Month) FieldEvent(com.extjs.gxt.ui.client.event.FieldEvent) DateWrapper(com.extjs.gxt.ui.client.util.DateWrapper) ActionToolBar(org.activityinfo.ui.client.page.common.toolbar.ActionToolBar) DateTimeFormat(com.google.gwt.i18n.client.DateTimeFormat)

Example 5 with ActionToolBar

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

Aggregations

ActionToolBar (org.activityinfo.ui.client.page.common.toolbar.ActionToolBar)8 LabelToolItem (com.extjs.gxt.ui.client.widget.toolbar.LabelToolItem)2 SeparatorToolItem (com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem)2 LocalDate (com.bedatadriven.rebar.time.calendar.LocalDate)1 El (com.extjs.gxt.ui.client.core.El)1 com.extjs.gxt.ui.client.event (com.extjs.gxt.ui.client.event)1 FieldEvent (com.extjs.gxt.ui.client.event.FieldEvent)1 ListStore (com.extjs.gxt.ui.client.store.ListStore)1 Record (com.extjs.gxt.ui.client.store.Record)1 Store (com.extjs.gxt.ui.client.store.Store)1 DateWrapper (com.extjs.gxt.ui.client.util.DateWrapper)1 ContentPanel (com.extjs.gxt.ui.client.widget.ContentPanel)1 Dialog (com.extjs.gxt.ui.client.widget.Dialog)1 MessageBox (com.extjs.gxt.ui.client.widget.MessageBox)1 CheckBox (com.extjs.gxt.ui.client.widget.form.CheckBox)1 com.extjs.gxt.ui.client.widget.grid (com.extjs.gxt.ui.client.widget.grid)1 FitLayout (com.extjs.gxt.ui.client.widget.layout.FitLayout)1 Scheduler (com.google.gwt.core.client.Scheduler)1 EventBus (com.google.gwt.event.shared.EventBus)1 HandlerRegistration (com.google.gwt.event.shared.HandlerRegistration)1