Search in sources :

Example 1 with ActionEnableEvent

use of org.geosdi.geoplatform.gui.configuration.action.event.ActionEnableEvent in project geo-platform by geosdi.

the class GPSecureButton method initializeSecureAction.

private void initializeSecureAction(GeoPlatformSecureAction<ButtonEvent> action) {
    action.addActionEnableHandler(new ActionEnableHandler() {

        @Override
        public void onActionEnabled(ActionEnableEvent event) {
            if (event.isEnabled()) {
                GPSecureButton.super.enable();
            } else {
                GPSecureButton.super.disable();
            }
        }
    });
    this.secureAction = action;
    this.enable();
}
Also used : ActionEnableEvent(org.geosdi.geoplatform.gui.configuration.action.event.ActionEnableEvent) ActionEnableHandler(org.geosdi.geoplatform.gui.configuration.action.event.ActionEnableHandler)

Example 2 with ActionEnableEvent

use of org.geosdi.geoplatform.gui.configuration.action.event.ActionEnableEvent in project geo-platform by geosdi.

the class AddModifyTimeFilterAction method manageTreeSelection.

/**
 * @param selection
 */
@Override
public void manageTreeSelection(List<GPBeanTreeModel> selection) {
    boolean selectionEnabled = ((selection != null) && (selection.size() == 1) ? this.manageTreeInternalSelection(selection.get(0)) : TRUE);
    this.handlerManager.fireEvent(new ActionEnableEvent((this.isEnabled() ? selectionEnabled : this.isEnabled())));
}
Also used : ActionEnableEvent(org.geosdi.geoplatform.gui.configuration.action.event.ActionEnableEvent)

Example 3 with ActionEnableEvent

use of org.geosdi.geoplatform.gui.configuration.action.event.ActionEnableEvent in project geo-platform by geosdi.

the class RemoveTimeFilterAction method manageTreeSelection.

/**
 * @param selection
 */
@Override
public void manageTreeSelection(List<GPBeanTreeModel> selection) {
    boolean selectionEnabled = ((selection != null) && (selection.size() == 1) ? this.manageTreeInternalSelection(selection.get(0)) : TRUE);
    this.handlerManager.fireEvent(new ActionEnableEvent((this.isEnabled() ? selectionEnabled : this.isEnabled())));
}
Also used : ActionEnableEvent(org.geosdi.geoplatform.gui.configuration.action.event.ActionEnableEvent)

Example 4 with ActionEnableEvent

use of org.geosdi.geoplatform.gui.configuration.action.event.ActionEnableEvent in project geo-platform by geosdi.

the class FeatureAttributesWidget method resetAttributes.

@Override
public void resetAttributes() {
    grid.stopEditing(true);
    store.rejectChanges();
    bus.fireEvent(new ActionEnableEvent(false));
}
Also used : ActionEnableEvent(org.geosdi.geoplatform.gui.configuration.action.event.ActionEnableEvent)

Example 5 with ActionEnableEvent

use of org.geosdi.geoplatform.gui.configuration.action.event.ActionEnableEvent in project geo-platform by geosdi.

the class FeatureAttributesWidget method successfulTransaction.

@Override
public void successfulTransaction() {
    this.bus.fireEvent(new FeatureStatusBarEvent("Successful Transaction", STATUS_OK));
    store.commitChanges();
    bus.fireEvent(new ActionEnableEvent(Boolean.FALSE));
}
Also used : FeatureStatusBarEvent(org.geosdi.geoplatform.gui.client.puregwt.wfs.event.FeatureStatusBarEvent) ActionEnableEvent(org.geosdi.geoplatform.gui.configuration.action.event.ActionEnableEvent)

Aggregations

ActionEnableEvent (org.geosdi.geoplatform.gui.configuration.action.event.ActionEnableEvent)11 ActionEnableHandler (org.geosdi.geoplatform.gui.configuration.action.event.ActionEnableHandler)4 FeatureStatusBarEvent (org.geosdi.geoplatform.gui.client.puregwt.wfs.event.FeatureStatusBarEvent)2 CheckMenuItem (com.extjs.gxt.ui.client.widget.menu.CheckMenuItem)1 Menu (com.extjs.gxt.ui.client.widget.menu.Menu)1 MenuItem (com.extjs.gxt.ui.client.widget.menu.MenuItem)1 FeatureDetail (org.geosdi.geoplatform.gui.client.model.wfs.FeatureDetail)1 GPTreeMenuGroupEnableEvent (org.geosdi.geoplatform.gui.configuration.composite.menu.puregwt.event.GPTreeMenuGroupEnableEvent)1 AbstractTreeMenuStrategy (org.geosdi.geoplatform.gui.impl.tree.menu.strategy.AbstractTreeMenuStrategy)1