Search in sources :

Example 1 with NewLayerWizard

use of org.activityinfo.client.report.editor.map.NewLayerWizard 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)

Aggregations

NewLayerWizard (org.activityinfo.client.report.editor.map.NewLayerWizard)1 WizardCallback (org.activityinfo.client.widget.wizard.WizardCallback)1 WizardDialog (org.activityinfo.client.widget.wizard.WizardDialog)1 MapReportElement (org.activityinfo.shared.report.model.MapReportElement)1