comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/DigitizePanel.java @ 915:89a47098bcbd

Hide geometry layer in floodmap when tab selection changes. (Issue265) flys-client/trunk@2778 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 16 Sep 2011 12:56:48 +0000
parents 77a549772aa9
children 17e7d5e437fb
comparison
equal deleted inserted replaced
914:39a39e9be5af 915:89a47098bcbd
7 7
8 import com.smartgwt.client.util.SC; 8 import com.smartgwt.client.util.SC;
9 import com.smartgwt.client.widgets.Canvas; 9 import com.smartgwt.client.widgets.Canvas;
10 import com.smartgwt.client.widgets.events.ResizedEvent; 10 import com.smartgwt.client.widgets.events.ResizedEvent;
11 import com.smartgwt.client.widgets.events.ResizedHandler; 11 import com.smartgwt.client.widgets.events.ResizedHandler;
12 import com.smartgwt.client.widgets.tab.events.TabSelectedHandler;
13 import com.smartgwt.client.widgets.tab.events.TabSelectedEvent;
12 14
13 import org.gwtopenmaps.openlayers.client.Map; 15 import org.gwtopenmaps.openlayers.client.Map;
14 import org.gwtopenmaps.openlayers.client.feature.VectorFeature; 16 import org.gwtopenmaps.openlayers.client.feature.VectorFeature;
15 import org.gwtopenmaps.openlayers.client.format.GeoJSON; 17 import org.gwtopenmaps.openlayers.client.format.GeoJSON;
16 import org.gwtopenmaps.openlayers.client.layer.WMS; 18 import org.gwtopenmaps.openlayers.client.layer.WMS;
29 import de.intevation.flys.client.client.ui.map.MapPanel; 31 import de.intevation.flys.client.client.ui.map.MapPanel;
30 import de.intevation.flys.client.client.services.MapInfoService; 32 import de.intevation.flys.client.client.services.MapInfoService;
31 import de.intevation.flys.client.client.services.MapInfoServiceAsync; 33 import de.intevation.flys.client.client.services.MapInfoServiceAsync;
32 34
33 35
34 public class DigitizePanel extends SelectProvider { 36 public class DigitizePanel
37 extends SelectProvider
38 implements TabSelectedHandler {
35 39
36 protected MapInfoServiceAsync mapInfo = GWT.create(MapInfoService.class); 40 protected MapInfoServiceAsync mapInfo = GWT.create(MapInfoService.class);
37 41
38 protected FloodMap floodMap; 42 protected FloodMap floodMap;
39 43
132 136
133 mapPanel.getFloodMap().setSize(w, h); 137 mapPanel.getFloodMap().setSize(w, h);
134 } 138 }
135 }); 139 });
136 140
141 parameterList.registerCollectionViewTabHandler(this);
142
137 WMS axis = getLayer( 143 WMS axis = getLayer(
138 mapInfo.getWmsUrl(), "riveraxis", 144 mapInfo.getWmsUrl(), "riveraxis",
139 mapInfo.getProjection(), false); 145 mapInfo.getProjection(), false);
140 WMS back = getLayer( 146 WMS back = getLayer(
141 mapInfo.getBackgroundWmsUrl(), mapInfo.getBackgroundWmsLayers(), 147 mapInfo.getBackgroundWmsUrl(), mapInfo.getBackgroundWmsLayers(),
168 wms.setIsVisible(true); 174 wms.setIsVisible(true);
169 wms.setIsBaseLayer(x); 175 wms.setIsBaseLayer(x);
170 176
171 return wms; 177 return wms;
172 } 178 }
179
180
181 public void onTabSelected(TabSelectedEvent tse) {
182 if (tse.getTabNum () != 0) {
183 floodMap.hideBarrierLayer();
184 }
185 else {
186 floodMap.showBarrierLayer();
187 }
188 }
173 } 189 }
174 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 190 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org