Search in sources :

Example 1 with WizardCallback

use of org.activityinfo.client.widget.wizard.WizardCallback in project activityinfo by bedatadriven.

the class DataEntryPage method doImport.

protected void doImport() {
    final int activityId = currentPlace.getFilter().getRestrictedCategory(DimensionType.Activity);
    dispatcher.execute(new GetSchema(), new AsyncCallback<SchemaDTO>() {

        @Override
        public void onFailure(Throwable caught) {
        // TODO Auto-generated method stub
        }

        @Override
        public void onSuccess(SchemaDTO result) {
            Wizard wizard = new ImporterWizard(dispatcher, result.getActivityById(activityId));
            WizardDialog dialog = new WizardDialog(wizard);
            dialog.show(new WizardCallback() {
            });
        }
    });
}
Also used : WizardCallback(org.activityinfo.client.widget.wizard.WizardCallback) ImporterWizard(org.activityinfo.client.importer.ImporterWizard) GetSchema(org.activityinfo.shared.command.GetSchema) SchemaDTO(org.activityinfo.shared.dto.SchemaDTO) ImporterWizard(org.activityinfo.client.importer.ImporterWizard) Wizard(org.activityinfo.client.widget.wizard.Wizard) WizardDialog(org.activityinfo.client.widget.wizard.WizardDialog)

Example 2 with WizardCallback

use of org.activityinfo.client.widget.wizard.WizardCallback in project activityinfo by bedatadriven.

the class MapTemplate method createElement.

@Override
public void createElement(final AsyncCallback<ReportElement> callback) {
    final NewLayerWizard wizard = new NewLayerWizard(dispatcher);
    WizardDialog dialog = new WizardDialog(wizard);
    dialog.setHeading(I18N.CONSTANTS.newMap());
    dialog.show(new WizardCallback() {

        @Override
        public void onFinished() {
            MapReportElement map = new MapReportElement();
            map.addLayer(wizard.createLayer());
            callback.onSuccess(map);
        }
    });
// dialog.addValueChangeHandler(new ValueChangeHandler<MapLayer>() {
// 
// @Override
// public void onValueChange(ValueChangeEvent<MapLayer> event) {
// createMap(callback, event.getValue());
// }
// });
}
Also used : NewLayerWizard(org.activityinfo.client.report.editor.map.NewLayerWizard) MapReportElement(org.activityinfo.shared.report.model.MapReportElement) WizardCallback(org.activityinfo.client.widget.wizard.WizardCallback) WizardDialog(org.activityinfo.client.widget.wizard.WizardDialog)

Example 3 with WizardCallback

use of org.activityinfo.client.widget.wizard.WizardCallback in project activityinfo by bedatadriven.

the class LayersWidget method createAddLayerButton.

private void createAddLayerButton() {
    Button addLayerButton = new Button();
    addLayerButton.setText(I18N.CONSTANTS.add());
    addLayerButton.addListener(Events.Select, new SelectionListener<ButtonEvent>() {

        @Override
        public void componentSelected(ButtonEvent ce) {
            final NewLayerWizard wizard = new NewLayerWizard(service);
            addLayersDialog = new WizardDialog(wizard);
            addLayersDialog.show(new WizardCallback() {

                @Override
                public void onFinished() {
                    addLayer(wizard.createLayer());
                }
            });
        }
    });
    addLayerButton.setIcon(IconImageBundle.ICONS.add());
    layersPanel.getHeader().addTool(addLayerButton);
}
Also used : WizardCallback(org.activityinfo.client.widget.wizard.WizardCallback) Button(com.extjs.gxt.ui.client.widget.button.Button) ButtonEvent(com.extjs.gxt.ui.client.event.ButtonEvent) WizardDialog(org.activityinfo.client.widget.wizard.WizardDialog)

Aggregations

WizardCallback (org.activityinfo.client.widget.wizard.WizardCallback)3 WizardDialog (org.activityinfo.client.widget.wizard.WizardDialog)3 ButtonEvent (com.extjs.gxt.ui.client.event.ButtonEvent)1 Button (com.extjs.gxt.ui.client.widget.button.Button)1 ImporterWizard (org.activityinfo.client.importer.ImporterWizard)1 NewLayerWizard (org.activityinfo.client.report.editor.map.NewLayerWizard)1 Wizard (org.activityinfo.client.widget.wizard.Wizard)1 GetSchema (org.activityinfo.shared.command.GetSchema)1 SchemaDTO (org.activityinfo.shared.dto.SchemaDTO)1 MapReportElement (org.activityinfo.shared.report.model.MapReportElement)1