Mercurial > dive4elements > river
annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/DigitizePanel.java @ 5611:17e2324c760e
Renable map print button
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 09 Apr 2013 15:14:15 +0200 |
parents | 8d0af912351c |
children | 4f935415bb20 |
rev | line source |
---|---|
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.client.client.ui; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import com.google.gwt.core.client.GWT; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 import com.google.gwt.user.client.rpc.AsyncCallback; |
5538
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
5 |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
6 import com.smartgwt.client.types.VerticalAlignment; |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 import com.smartgwt.client.util.SC; |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
8 import com.smartgwt.client.widgets.Canvas; |
2494
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
9 import com.smartgwt.client.widgets.Label; |
5538
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
10 import com.smartgwt.client.widgets.events.ParentMovedEvent; |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
11 import com.smartgwt.client.widgets.events.ParentMovedHandler; |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
12 import com.smartgwt.client.widgets.events.ResizedEvent; |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
13 import com.smartgwt.client.widgets.events.ResizedHandler; |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
14 import com.smartgwt.client.widgets.events.VisibilityChangedEvent; |
1389
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
15 import com.smartgwt.client.widgets.events.VisibilityChangedHandler; |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
16 import com.smartgwt.client.widgets.layout.VLayout; |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
17 import com.smartgwt.client.widgets.tab.events.TabSelectedEvent; |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
18 import com.smartgwt.client.widgets.tab.events.TabSelectedHandler; |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
20 import de.intevation.flys.client.client.Config; |
4801
6aa1b8abe2d3
MapInfoService now submits layer names as well as WMS urls.
Christian Lins <christian.lins@intevation.de>
parents:
4632
diff
changeset
|
21 import de.intevation.flys.client.client.FLYS; |
6aa1b8abe2d3
MapInfoService now submits layer names as well as WMS urls.
Christian Lins <christian.lins@intevation.de>
parents:
4632
diff
changeset
|
22 import de.intevation.flys.client.client.FLYSConstants; |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
23 import de.intevation.flys.client.client.services.MapInfoService; |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
24 import de.intevation.flys.client.client.services.MapInfoServiceAsync; |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
25 import de.intevation.flys.client.client.ui.map.FloodMap; |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
26 import de.intevation.flys.client.client.ui.map.MapPanel; |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 import de.intevation.flys.client.shared.model.Data; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 import de.intevation.flys.client.shared.model.DataItem; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 import de.intevation.flys.client.shared.model.DataList; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 import de.intevation.flys.client.shared.model.DefaultData; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 import de.intevation.flys.client.shared.model.DefaultDataItem; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 import de.intevation.flys.client.shared.model.MapInfo; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 |
5538
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
34 import java.util.List; |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
35 |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
36 import org.gwtopenmaps.openlayers.client.Map; |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
37 import org.gwtopenmaps.openlayers.client.control.Attribution; |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
38 import org.gwtopenmaps.openlayers.client.layer.WMS; |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
39 import org.gwtopenmaps.openlayers.client.layer.WMSOptions; |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
40 import org.gwtopenmaps.openlayers.client.layer.WMSParams; |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
41 |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 |
915
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
43 public class DigitizePanel |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
44 extends SelectProvider |
1389
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
45 implements TabSelectedHandler, VisibilityChangedHandler { |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 |
4131
360e22afb98b
Cosmetics, warnings and minor TODOs.
Christian Lins <christian.lins@intevation.de>
parents:
4062
diff
changeset
|
47 private static final long serialVersionUID = 3529775660871273314L; |
360e22afb98b
Cosmetics, warnings and minor TODOs.
Christian Lins <christian.lins@intevation.de>
parents:
4062
diff
changeset
|
48 |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 protected MapInfoServiceAsync mapInfo = GWT.create(MapInfoService.class); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 protected FloodMap floodMap; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 |
1389
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
53 protected MapPanel mapPanel; |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 public static final String UESK_BARRIERS = "uesk.barriers"; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 |
4801
6aa1b8abe2d3
MapInfoService now submits layer names as well as WMS urls.
Christian Lins <christian.lins@intevation.de>
parents:
4632
diff
changeset
|
57 /** The message class that provides i18n strings. */ |
6aa1b8abe2d3
MapInfoService now submits layer names as well as WMS urls.
Christian Lins <christian.lins@intevation.de>
parents:
4632
diff
changeset
|
58 protected FLYSConstants MSG = GWT.create(FLYSConstants.class); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 public DigitizePanel() { |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 } |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 @Override |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 public Canvas create(DataList list) { |
5538
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
66 List<Data> data = list.getAll(); // FIXME: data is not used? getAll() side-effects? |
1389
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
67 helperContainer.addVisibilityChangedHandler(this); |
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
68 |
872
a7179e3a774e
Suppress the GeoJSON string to be drawn into the static UI.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
833
diff
changeset
|
69 DataList clone = (DataList) list.clone(); |
a7179e3a774e
Suppress the GeoJSON string to be drawn into the static UI.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
833
diff
changeset
|
70 List<Data> all = clone.getAll(); |
a7179e3a774e
Suppress the GeoJSON string to be drawn into the static UI.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
833
diff
changeset
|
71 all.remove(UESK_BARRIERS); |
a7179e3a774e
Suppress the GeoJSON string to be drawn into the static UI.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
833
diff
changeset
|
72 |
5312
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
73 Canvas widget = createWidget(list); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 final Config cfg = Config.getInstance(); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 final String locale = cfg.getLocale(); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 |
873
77a549772aa9
Query MapInfo object for correct river (was hard coded).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
872
diff
changeset
|
78 String river = getDataValue("state.winfo.river", "river"); |
1425
bc06a671ef60
Removed the URL parameter from service calls. The service
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1389
diff
changeset
|
79 mapInfo.getMapInfo(locale, river, new AsyncCallback<MapInfo>() { |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
80 @Override |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 public void onFailure(Throwable caught) { |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 String msg = caught.getMessage(); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 GWT.log("Error while fetching MapInfo: " + msg); |
4801
6aa1b8abe2d3
MapInfoService now submits layer names as well as WMS urls.
Christian Lins <christian.lins@intevation.de>
parents:
4632
diff
changeset
|
85 SC.warn(FLYS.getExceptionString(MSG, caught)); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 } |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
88 @Override |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 public void onSuccess(MapInfo info) { |
5312
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
90 createMapWidget(info); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
91 } |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
92 }); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
93 |
5312
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
94 return widget; |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 } |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
96 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
97 |
2494
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
98 /** |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
99 * This method creates the content of the widget. |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
100 * |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
101 * @param data The {@link DataList} object. |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
102 * |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
103 * @return a combobox. |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
104 */ |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
105 @Override |
2494
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
106 protected Canvas createWidget(DataList data) { |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
107 GWT.log("DigitizePanel - createWidget()"); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
108 |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
109 VLayout layout = new VLayout(); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
110 layout.setAlign(VerticalAlignment.TOP); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
111 layout.setHeight(25); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
112 |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
113 int size = data.size(); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
114 |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
115 for (int i = 0; i < size; i++) { |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
116 Data d = data.get(i); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
117 |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
118 Label label = new Label(d.getDescription()); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
119 label.setValign(VerticalAlignment.TOP); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
120 label.setHeight(20); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
121 label.setWidth(400); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
122 |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
123 layout.addMember(label); |
4574
32a4651eef93
flys-client: Shapefile upload widget readded again (regression).
Christian Lins <christian.lins@intevation.de>
parents:
4553
diff
changeset
|
124 layout.addMember(getNextButton()); |
2494
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
125 } |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
126 |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
127 layout.setAlign(VerticalAlignment.TOP); |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
128 |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
129 return layout; |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
130 } |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
131 |
88b51e6e0334
Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1425
diff
changeset
|
132 |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
133 @Override |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
134 protected Data[] getData() { |
5312
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
135 Data[] total = new Data[1]; |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
136 |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
137 if (floodMap != null) { |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
138 DataItem item = new DefaultDataItem( |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
139 UESK_BARRIERS, UESK_BARRIERS, floodMap.getFeaturesAsGeoJSON()); |
5312
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
140 total[0] = new DefaultData( |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
141 UESK_BARRIERS, null, null, new DataItem[] { item }); |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
142 } |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
143 else { |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
144 // Happens when OpenLayers is missing |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
145 GWT.log("floodMap is null -> OpenLayers missing?"); |
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
146 } |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
147 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
148 return total; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
149 } |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
150 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
151 |
5312
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
152 public void createMapWidget(MapInfo mapInfo) { |
1389
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
153 mapPanel = new MapPanel(mapInfo, true); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
154 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
155 floodMap = mapPanel.getFloodMap(); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
156 Map map = floodMap.getMap(); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
157 |
5538
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
158 helperContainer.addResizedHandler(new ResizedHandler() { |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
159 @Override |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
160 public void onResized(ResizedEvent event) { |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
161 mapPanel.doLayout(helperContainer.getWidth(), helperContainer.getHeight()); |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
162 } |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
163 }); |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
164 helperContainer.addParentMovedHandler(new ParentMovedHandler() { |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
165 @Override |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
166 public void onParentMoved(ParentMovedEvent event) { |
5539
8d0af912351c
Revert config.yaml to usable version.
Christian Lins <christian.lins@intevation.de>
parents:
5538
diff
changeset
|
167 mapPanel.doLayout(helperContainer.getWidth(), helperContainer.getHeight()); |
5538
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
168 } |
ef32ab3c1679
d4e/client: Map preview in DigitizePanel is now properly resized (as long as the project is not reopened).
Christian Lins <christian.lins@intevation.de>
parents:
5312
diff
changeset
|
169 }); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
170 helperContainer.addMember(mapPanel); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
171 |
915
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
172 parameterList.registerCollectionViewTabHandler(this); |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
173 |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
174 WMS axis = getLayer( |
4632
02cf2b1dff84
Make floodmap riveraxis layer name configurable.
Christian Lins <christian.lins@intevation.de>
parents:
4574
diff
changeset
|
175 mapInfo.getWmsUrl(), mapInfo.getWmsLayers(), |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
176 mapInfo.getProjection(), false); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
177 WMS back = getLayer( |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
178 mapInfo.getBackgroundWmsUrl(), mapInfo.getBackgroundWmsLayers(), |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
179 mapInfo.getProjection(), false); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
180 |
4553
fac54b8470d4
Map view in DigitizePanel now shows OSM background, river axis and
Christian Lins <christian.lins@intevation.de>
parents:
4476
diff
changeset
|
181 map.addLayer(back); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
182 map.addLayer(axis); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
183 |
5312
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
184 String hws = getDataValue("state.winfo.uesk.dc-hws", "uesk.hws"); |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
185 if (hws != null && hws.length() > 0) { |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
186 WMS hwsLayer = getLayer( |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
187 //TODO: Use Mapinfo to get hws layer infos. |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
188 mapInfo.getWmsUrl().replace("river", "user"), |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
189 "ms_layer-hws-lines" + artifact.getUuid(), |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
190 mapInfo.getProjection(), |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
191 false); |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
192 map.addLayer(hwsLayer); |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
193 } |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
194 String userRgd = getDataValue("state.winfo.uesk.user-rgd", "uesk.user-rgd"); |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
195 if (userRgd != null && userRgd.length() > 0) { |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
196 WMS userLayer = getLayer( |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
197 //TODO: Use Mapinfo to get hws layer infos. |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
198 mapInfo.getWmsUrl().replace("river", "user"), |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
199 "ms_layer-user-rgd" + artifact.getUuid(), |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
200 mapInfo.getProjection(), |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
201 false); |
2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents:
5032
diff
changeset
|
202 map.addLayer(userLayer); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
203 } |
5032
4bf3b89b38d5
Added attribution to osm wms background layer.
Raimund Renkert <rrenkert@intevation.de>
parents:
5008
diff
changeset
|
204 map.addControl(new Attribution()); |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
205 map.zoomToMaxExtent(); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
206 } |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
207 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
208 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
209 protected WMS getLayer(String url, String layers, String proj, boolean x) { |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
210 WMSParams params = new WMSParams(); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
211 params.setLayers(layers); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
212 params.setFormat("image/png"); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
213 params.setIsTransparent(!x); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
214 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
215 WMSOptions opts = new WMSOptions(); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
216 opts.setProjection(proj); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
217 opts.setSingleTile(true); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
218 opts.setRatio(1); |
1302
17e7d5e437fb
Bumped OpenLayers to version 2.11 and GWT-OpenLayers to version 0.6
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
915
diff
changeset
|
219 opts.setBuffer(0); |
5032
4bf3b89b38d5
Added attribution to osm wms background layer.
Raimund Renkert <rrenkert@intevation.de>
parents:
5008
diff
changeset
|
220 if (layers.equals("OSM-WMS-Dienst")) { |
4bf3b89b38d5
Added attribution to osm wms background layer.
Raimund Renkert <rrenkert@intevation.de>
parents:
5008
diff
changeset
|
221 opts.setAttribution(MSG.attribution()); |
4bf3b89b38d5
Added attribution to osm wms background layer.
Raimund Renkert <rrenkert@intevation.de>
parents:
5008
diff
changeset
|
222 } |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
223 WMS wms = new WMS(layers, url, params, opts); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
224 wms.setIsVisible(true); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
225 wms.setIsBaseLayer(x); |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
226 |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
227 return wms; |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
228 } |
915
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
229 |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
230 |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
231 @Override |
915
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
232 public void onTabSelected(TabSelectedEvent tse) { |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
233 if (tse.getTabNum () != 0) { |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
234 floodMap.hideBarrierLayer(); |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
235 } |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
236 else { |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
237 floodMap.showBarrierLayer(); |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
238 } |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
873
diff
changeset
|
239 } |
1389
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
240 |
4062
145980c21700
Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents:
2494
diff
changeset
|
241 @Override |
1389
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
242 public void onVisibilityChanged(VisibilityChangedEvent vce) { |
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
243 if (!vce.getIsVisible()) { |
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
244 floodMap.hideBarrierLayer(); |
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
245 mapPanel.getMapToolbar().activateDrawFeature(false); |
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
246 } |
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
247 else { |
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
248 floodMap.showBarrierLayer(); |
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
249 } |
d29a9fa10313
Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1322
diff
changeset
|
250 } |
833
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
251 } |
dcecdd9693a8
Added a UIProvider that displays a combobox on the left and a map widget in the helper container.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
252 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |