comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java @ 1364:9981ba2ee13a

Display the datacage button in the map toolbar. flys-client/trunk@3063 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 24 Oct 2011 13:35:30 +0000
parents 8a93fb299e64
children 4c65c5b60a86
comparison
equal deleted inserted replaced
1363:9da7fdfbb80e 1364:9981ba2ee13a
41 import de.intevation.flys.client.shared.model.OutputMode; 41 import de.intevation.flys.client.shared.model.OutputMode;
42 42
43 import de.intevation.flys.client.client.Config; 43 import de.intevation.flys.client.client.Config;
44 import de.intevation.flys.client.client.services.StepForwardService; 44 import de.intevation.flys.client.client.services.StepForwardService;
45 import de.intevation.flys.client.client.services.StepForwardServiceAsync; 45 import de.intevation.flys.client.client.services.StepForwardServiceAsync;
46 import de.intevation.flys.client.client.event.RedrawRequestHandler;
47 import de.intevation.flys.client.client.event.RedrawRequestEvent;
46 import de.intevation.flys.client.client.ui.CollectionView; 48 import de.intevation.flys.client.client.ui.CollectionView;
47 import de.intevation.flys.client.client.ui.OutputTab; 49 import de.intevation.flys.client.client.ui.OutputTab;
48 import de.intevation.flys.client.client.ui.ThemePanel; 50 import de.intevation.flys.client.client.ui.ThemePanel;
49 51
50 52
51 public class MapOutputTab extends OutputTab { 53 public class MapOutputTab extends OutputTab implements RedrawRequestHandler {
52 54
53 public static final String DEFAULT_SRID = "4326"; 55 public static final String DEFAULT_SRID = "4326";
54 56
55 public static final String BARRIERS_PARAMETER_KEY = "uesk.barriers"; 57 public static final String BARRIERS_PARAMETER_KEY = "uesk.barriers";
56 58
57 public static final String WSPLGEN_FACET = "floodmap.wsplgen"; 59 public static final String WSPLGEN_FACET = "floodmap.wsplgen";
58 60
59 61
60 protected StepForwardServiceAsync feedService = 62 protected StepForwardServiceAsync feedService =
61 GWT.create(StepForwardService.class); 63 GWT.create(StepForwardService.class);
62
63 protected CollectionView parent;
64 64
65 protected MapToolbar controlPanel; 65 protected MapToolbar controlPanel;
66 protected ThemePanel themePanel; 66 protected ThemePanel themePanel;
67 protected Widget mapPanel; 67 protected Widget mapPanel;
68 68
73 String title, 73 String title,
74 Collection collection, 74 Collection collection,
75 OutputMode mode, 75 OutputMode mode,
76 CollectionView collectionView 76 CollectionView collectionView
77 ){ 77 ){
78 super(title, collection, mode); 78 super(title, collection, collectionView, mode);
79 this.parent = collectionView;
80 79
81 floodMap = new FloodMap(getSrid(), getMaxExtent()); 80 floodMap = new FloodMap(getSrid(), getMaxExtent());
82 81
83 initLayout(); 82 initLayout();
84 initLayers(); 83 initLayers();
229 228
230 vector.addFeatures(features); 229 vector.addFeatures(features);
231 } 230 }
232 231
233 232
233 @Override
234 public void onRedrawRequest(RedrawRequestEvent event) {
235 // TODO FILL ME
236 GWT.log("TODO: Request redraw.");
237 }
238
239
234 protected Map getMap() { 240 protected Map getMap() {
235 return floodMap.getMap(); 241 return floodMap.getMap();
236 } 242 }
237 243
238 244
262 268
263 protected String getGeoJSONFromStatic(ArtifactDescription desc) { 269 protected String getGeoJSONFromStatic(ArtifactDescription desc) {
264 // TODO Implement this method, if there are reachable states right after 270 // TODO Implement this method, if there are reachable states right after
265 // the floodmap state - which is currently not the case. 271 // the floodmap state - which is currently not the case.
266 return null; 272 return null;
267 }
268
269
270 public Artifact getArtifact() {
271 return parent.getArtifact();
272 } 273 }
273 274
274 275
275 public ThemeList getThemeList() { 276 public ThemeList getThemeList() {
276 return collection.getThemeList(mode.getName()); 277 return collection.getThemeList(mode.getName());
393 return wms; 394 return wms;
394 } 395 }
395 396
396 397
397 protected MapToolbar createControlPanel(Canvas wrapper) { 398 protected MapToolbar createControlPanel(Canvas wrapper) {
398 return new MapToolbar(floodMap, wrapper, false); 399 return new MapToolbar(this, floodMap, wrapper, false);
399 } 400 }
400 401
401 402
402 protected Canvas createThemePanel() { 403 protected Canvas createThemePanel() {
403 Canvas c = new Canvas(); 404 Canvas c = new Canvas();

http://dive4elements.wald.intevation.org