annotate gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DigitizePanel.java @ 7602:c50dbbe17950

issue1596: Store table (cell) data twice: Once as (formatted) string as coming from server, once transformed into float (or string). The benefit is that now we can sort table data numerically, while keeping the formatted and i18ned display of values.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 27 Nov 2013 14:55:25 +0100
parents ea9eef426962
children 5e38e2924c07
rev   line source
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
5993
ea9eef426962 Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5861
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
5993
ea9eef426962 Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5861
diff changeset
6 * documentation coming with Dive4Elements River for details.
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
9 package org.dive4elements.river.client.client.ui;
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
10
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
11 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
12 import com.google.gwt.user.client.rpc.AsyncCallback;
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
13 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
14 import com.smartgwt.client.util.SC;
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
15 import com.smartgwt.client.widgets.Canvas;
2494
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
16 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
17 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
18 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
19 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
20 import com.smartgwt.client.widgets.events.ResizedHandler;
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
21 import com.smartgwt.client.widgets.events.VisibilityChangedEvent;
1389
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
22 import com.smartgwt.client.widgets.events.VisibilityChangedHandler;
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
23 import com.smartgwt.client.widgets.layout.VLayout;
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
24 import com.smartgwt.client.widgets.tab.events.TabSelectedEvent;
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
25 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
26
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
27 import org.dive4elements.river.client.client.Config;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
28 import org.dive4elements.river.client.client.FLYS;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
29 import org.dive4elements.river.client.client.FLYSConstants;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
30 import org.dive4elements.river.client.client.services.MapInfoService;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
31 import org.dive4elements.river.client.client.services.MapInfoServiceAsync;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
32 import org.dive4elements.river.client.client.ui.map.FloodMap;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
33 import org.dive4elements.river.client.client.ui.map.MapPanel;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
34 import org.dive4elements.river.client.shared.model.Data;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
35 import org.dive4elements.river.client.shared.model.DataItem;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
36 import org.dive4elements.river.client.shared.model.DataList;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
37 import org.dive4elements.river.client.shared.model.DefaultData;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
38 import org.dive4elements.river.client.shared.model.DefaultDataItem;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
39 import org.dive4elements.river.client.shared.model.MapInfo;
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
40
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
41 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
42
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
43 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
44 import org.gwtopenmaps.openlayers.client.control.Attribution;
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
45 import org.gwtopenmaps.openlayers.client.layer.TransitionEffect;
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
46 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
47 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
48 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
49
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
50
915
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
51 public class DigitizePanel
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
52 extends SelectProvider
1389
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
53 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
54
4131
360e22afb98b Cosmetics, warnings and minor TODOs.
Christian Lins <christian.lins@intevation.de>
parents: 4062
diff changeset
55 private static final long serialVersionUID = 3529775660871273314L;
360e22afb98b Cosmetics, warnings and minor TODOs.
Christian Lins <christian.lins@intevation.de>
parents: 4062
diff changeset
56
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
57 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
58
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 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
60
1389
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
61 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
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 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
64
4801
6aa1b8abe2d3 MapInfoService now submits layer names as well as WMS urls.
Christian Lins <christian.lins@intevation.de>
parents: 4632
diff changeset
65 /** 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
66 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
67
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
68 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
69 }
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
70
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
71
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
72 @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
73 public Canvas create(DataList list) {
1389
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
74 helperContainer.addVisibilityChangedHandler(this);
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
75
872
a7179e3a774e Suppress the GeoJSON string to be drawn into the static UI.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 833
diff changeset
76 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
77 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
78 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
79
5312
2c1045a1e3fe Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents: 5032
diff changeset
80 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
81
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 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
83 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
84
873
77a549772aa9 Query MapInfo object for correct river (was hard coded).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 872
diff changeset
85 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
86 mapInfo.getMapInfo(locale, river, new AsyncCallback<MapInfo>() {
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
87 @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
88 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
89 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
90
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 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
92 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
93 }
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
94
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
95 @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
96 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
97 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
98 }
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
99 });
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
100
5312
2c1045a1e3fe Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents: 5032
diff changeset
101 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
102 }
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
103
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
104
2494
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
105 /**
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
106 * This method creates the content of the widget.
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
107 *
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
108 * @param data The {@link DataList} object.
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
109 *
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
110 * @return a combobox.
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
111 */
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
112 @Override
2494
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
113 protected Canvas createWidget(DataList data) {
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
114 GWT.log("DigitizePanel - createWidget()");
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
115
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
116 VLayout layout = new VLayout();
2494
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
117 layout.setAlign(VerticalAlignment.TOP);
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
118 layout.setHeight(25);
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
119
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
120 int size = data.size();
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
121
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
122 for (int i = 0; i < size; i++) {
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
123 Data d = data.get(i);
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
124
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
125 Label label = new Label(d.getDescription());
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
126 label.setValign(VerticalAlignment.TOP);
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
127 label.setHeight(20);
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
128 label.setWidth(400);
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
129
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
130 layout.addMember(label);
4574
32a4651eef93 flys-client: Shapefile upload widget readded again (regression).
Christian Lins <christian.lins@intevation.de>
parents: 4553
diff changeset
131 layout.addMember(getNextButton());
2494
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
132 }
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
133
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
134 layout.setAlign(VerticalAlignment.TOP);
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
135
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
136 return layout;
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
137 }
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
138
88b51e6e0334 Issue 657.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1425
diff changeset
139
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
140 @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
141 protected Data[] getData() {
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
142 final 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
143
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
144 if (floodMap != null) {
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
145 DataItem item = new DefaultDataItem(
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
146 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
147 total[0] = new DefaultData(
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
148 UESK_BARRIERS, null, null, new DataItem[] { item });
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
149 }
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
150 else {
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
151 // Happens when OpenLayers is missing
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
152 GWT.log("floodMap is null -> OpenLayers missing?");
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
153 }
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 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
156 }
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
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
158
5312
2c1045a1e3fe Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents: 5032
diff changeset
159 public void createMapWidget(MapInfo mapInfo) {
1389
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
160 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
161
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
162 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
163 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
164
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
165 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
166 @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
167 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
168 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
169 }
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
170 });
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
171 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
172 @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
173 public void onParentMoved(ParentMovedEvent event) {
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
174 mapPanel.getFloodMap().updateSize();
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
175 }
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
176 });
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
177 helperContainer.addVisibilityChangedHandler(new VisibilityChangedHandler() {
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
178 @Override
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
179 public void onVisibilityChanged(VisibilityChangedEvent event) {
5539
8d0af912351c Revert config.yaml to usable version.
Christian Lins <christian.lins@intevation.de>
parents: 5538
diff changeset
180 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
181 }
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
182 });
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
183 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
184
915
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
185 parameterList.registerCollectionViewTabHandler(this);
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
186
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
187 WMS axis = getLayer(
4632
02cf2b1dff84 Make floodmap riveraxis layer name configurable.
Christian Lins <christian.lins@intevation.de>
parents: 4574
diff changeset
188 mapInfo.getWmsUrl(), mapInfo.getWmsLayers(),
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
189 mapInfo.getProjection(), false, 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
190 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
191 mapInfo.getBackgroundWmsUrl(), mapInfo.getBackgroundWmsLayers(),
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
192 mapInfo.getProjection(), false, false);
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
193
4553
fac54b8470d4 Map view in DigitizePanel now shows OSM background, river axis and
Christian Lins <christian.lins@intevation.de>
parents: 4476
diff changeset
194 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
195 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
196
5312
2c1045a1e3fe Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents: 5032
diff changeset
197 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
198 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
199 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
200 //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
201 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
202 "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
203 mapInfo.getProjection(),
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
204 false, true);
5312
2c1045a1e3fe Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents: 5032
diff changeset
205 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
206 }
2c1045a1e3fe Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents: 5032
diff changeset
207 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
208 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
209 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
210 //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
211 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
212 "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
213 mapInfo.getProjection(),
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
214 false, true);
5312
2c1045a1e3fe Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents: 5032
diff changeset
215 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
216 }
5032
4bf3b89b38d5 Added attribution to osm wms background layer.
Raimund Renkert <rrenkert@intevation.de>
parents: 5008
diff changeset
217 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
218 map.zoomToMaxExtent();
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
219
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
220 mapPanel.doLayout(helperContainer.getWidth(), helperContainer.getHeight());
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
221 }
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
222
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
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
224 protected WMS getLayer(String url, String layers, String proj, boolean isBaseLayer, boolean singleTiled) {
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
225 final WMSParams params = new WMSParams();
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
226 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
227 params.setFormat("image/png");
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
228 params.setIsTransparent(!isBaseLayer);
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
229
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
230 final WMSOptions opts = new WMSOptions();
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
231 opts.setProjection(proj);
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
232 opts.setSingleTile(false); // FIXME: Make working...
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
233 opts.setTransitionEffect(TransitionEffect.RESIZE);
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
234 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
235 opts.setBuffer(0);
5032
4bf3b89b38d5 Added attribution to osm wms background layer.
Raimund Renkert <rrenkert@intevation.de>
parents: 5008
diff changeset
236 if (layers.equals("OSM-WMS-Dienst")) {
4bf3b89b38d5 Added attribution to osm wms background layer.
Raimund Renkert <rrenkert@intevation.de>
parents: 5008
diff changeset
237 opts.setAttribution(MSG.attribution());
4bf3b89b38d5 Added attribution to osm wms background layer.
Raimund Renkert <rrenkert@intevation.de>
parents: 5008
diff changeset
238 }
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
239 final WMS wms = new WMS(layers, url, params, opts);
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
240 wms.setIsVisible(true);
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
241 wms.setIsBaseLayer(isBaseLayer);
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
242
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
243 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
244 }
915
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
245
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
246
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
247 @Override
915
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
248 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
249 if (tse.getTabNum () != 0) {
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
250 floodMap.hideBarrierLayer();
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
251 }
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
252 else {
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
253 floodMap.showBarrierLayer();
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
254 }
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
255 }
1389
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
256
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
257 @Override
1389
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
258 public void onVisibilityChanged(VisibilityChangedEvent vce) {
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
259 if (!vce.getIsVisible()) {
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
260 floodMap.hideBarrierLayer();
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
261 mapPanel.getMapToolbar().activateDrawFeature(false);
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
262 }
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
263 else {
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
264 floodMap.showBarrierLayer();
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
265 }
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
266 }
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
267 }
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
268 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org