use of org.activityinfo.client.report.editor.map.layerOptions.LayerOptionsPanel 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) {
reportEventBus.fireChange();
}
});
add(optionsPanel, new AbsoluteData(0, CONTROL_TOP_MARGIN));
}
Aggregations