Search in sources :

Example 6 with ActionToolBar

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);
}
Also used : El(com.extjs.gxt.ui.client.core.El) com.extjs.gxt.ui.client.event(com.extjs.gxt.ui.client.event) ActionToolBar(org.activityinfo.ui.client.page.common.toolbar.ActionToolBar) ContentPanel(com.extjs.gxt.ui.client.widget.ContentPanel) CanUpdate(org.activityinfo.ui.client.page.config.mvp.CanUpdate) ListStore(com.extjs.gxt.ui.client.store.ListStore) HashMap(java.util.HashMap) AsyncMonitor(org.activityinfo.ui.client.dispatch.AsyncMonitor) I18N(org.activityinfo.i18n.shared.I18N) ArrayList(java.util.ArrayList) HandlerRegistration(com.google.gwt.event.shared.HandlerRegistration) Map(java.util.Map) IsActivityDTO(org.activityinfo.legacy.shared.model.IsActivityDTO) FormDialogCallback(org.activityinfo.ui.client.page.common.dialog.FormDialogCallback) LockedPeriodDTO(org.activityinfo.legacy.shared.model.LockedPeriodDTO) EventBus(com.google.gwt.event.shared.EventBus) NullAsyncMonitor(org.activityinfo.ui.client.dispatch.monitor.NullAsyncMonitor) Record(com.extjs.gxt.ui.client.store.Record) com.extjs.gxt.ui.client.widget.grid(com.extjs.gxt.ui.client.widget.grid) CheckBox(com.extjs.gxt.ui.client.widget.form.CheckBox) FormDialogTether(org.activityinfo.ui.client.page.common.dialog.FormDialogTether) Scheduler(com.google.gwt.core.client.Scheduler) List(java.util.List) LockedPeriodListEditor(org.activityinfo.ui.client.page.config.LockedPeriodsPresenter.LockedPeriodListEditor) UserDatabaseDTO(org.activityinfo.legacy.shared.model.UserDatabaseDTO) UIActions(org.activityinfo.ui.client.page.common.toolbar.UIActions) SimpleEventBus(com.google.gwt.event.shared.SimpleEventBus) FitLayout(com.extjs.gxt.ui.client.widget.layout.FitLayout) MessageBox(com.extjs.gxt.ui.client.widget.MessageBox) ActivityFormDTO(org.activityinfo.legacy.shared.model.ActivityFormDTO) Dialog(com.extjs.gxt.ui.client.widget.Dialog) Store(com.extjs.gxt.ui.client.store.Store) ReadTextColumn(org.activityinfo.ui.client.page.common.columns.ReadTextColumn) CanCreate(org.activityinfo.ui.client.page.config.mvp.CanCreate) LocalDate(com.bedatadriven.rebar.time.calendar.LocalDate) EditableLocalDateColumn(org.activityinfo.ui.client.page.common.columns.EditableLocalDateColumn) FormDialogImpl(org.activityinfo.ui.client.page.common.dialog.FormDialogImpl) ActionToolBar(org.activityinfo.ui.client.page.common.toolbar.ActionToolBar)

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

Example 8 with ActionToolBar

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);
}
Also used : LabelToolItem(com.extjs.gxt.ui.client.widget.toolbar.LabelToolItem) 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