Search in sources :

Example 1 with AbsoluteData

use of com.extjs.gxt.ui.client.widget.layout.AbsoluteData in project activityinfo by bedatadriven.

the class MapEditor method createLayersWidget.

protected void createLayersWidget() {
    layersWidget = new LayersWidget(dispatcher, locator, eventBus, optionsPanel);
    // positioning is actually only set when setSize() is called below
    add(layersWidget, new AbsoluteData());
}
Also used : AbsoluteData(com.extjs.gxt.ui.client.widget.layout.AbsoluteData)

Example 2 with AbsoluteData

use of com.extjs.gxt.ui.client.widget.layout.AbsoluteData in project activityinfo by bedatadriven.

the class MapEditor method createMap.

protected void createMap() {
    mapPanel = new MapEditorMapView(dispatcher, eventBus);
    mapPanel.setHeadingText(I18N.CONSTANTS.preview());
    mapPanel.setZoomControlOffsetX(ZOOM_CONTROL_LEFT_MARGIN);
    AbsoluteData layout = new AbsoluteData();
    layout.setLeft(0);
    layout.setTop(0);
    layout.setAnchorSpec("100% 100%");
    add(mapPanel, layout);
}
Also used : AbsoluteData(com.extjs.gxt.ui.client.widget.layout.AbsoluteData)

Example 3 with AbsoluteData

use of com.extjs.gxt.ui.client.widget.layout.AbsoluteData in project activityinfo by bedatadriven.

the class MapEditor method createLayersOptionsPanel.

protected void createLayersOptionsPanel() {
    optionsPanel = new LayerOptionsPanel(dispatcher);
    optionsPanel.setVisible(false);
    optionsPanel.addListener(Events.Hide, new Listener<BaseEvent>() {

        @Override
        public void handleEvent(BaseEvent be) {
            mapPanel.setZoomControlOffsetX(ZOOM_CONTROL_LEFT_MARGIN);
        }
    });
    optionsPanel.addListener(Events.Show, new Listener<BaseEvent>() {

        @Override
        public void handleEvent(BaseEvent be) {
            mapPanel.setZoomControlOffsetX(LayerOptionsPanel.WIDTH + ZOOM_CONTROL_LEFT_MARGIN);
        }
    });
    optionsPanel.addValueChangeHandler(new ValueChangeHandler<MapLayer>() {

        @Override
        public void onValueChange(ValueChangeEvent<MapLayer> event) {
            MapEditor.this.mapReportElement.setFilter(event.getValue().getFilter());
            reportEventBus.fireChange();
        }
    });
    add(optionsPanel, new AbsoluteData(0, CONTROL_TOP_MARGIN));
}
Also used : MapLayer(org.activityinfo.legacy.shared.reports.model.layers.MapLayer) BaseEvent(com.extjs.gxt.ui.client.event.BaseEvent) AbsoluteData(com.extjs.gxt.ui.client.widget.layout.AbsoluteData) LayerOptionsPanel(org.activityinfo.ui.client.component.report.editor.map.layerOptions.LayerOptionsPanel)

Aggregations

AbsoluteData (com.extjs.gxt.ui.client.widget.layout.AbsoluteData)3 BaseEvent (com.extjs.gxt.ui.client.event.BaseEvent)1 MapLayer (org.activityinfo.legacy.shared.reports.model.layers.MapLayer)1 LayerOptionsPanel (org.activityinfo.ui.client.component.report.editor.map.layerOptions.LayerOptionsPanel)1