annotate gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DigitizePanel.java @ 8856:5e38e2924c07 3.2.x

Fix code style.
author Tom Gottfried <tom@intevation.de>
date Thu, 18 Jan 2018 20:12:01 +0100
parents ea9eef426962
children
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) {
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
168 mapPanel.doLayout(
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
169 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
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 });
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 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
173 @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
174 public void onParentMoved(ParentMovedEvent event) {
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
175 mapPanel.getFloodMap().updateSize();
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 });
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
178 helperContainer.addVisibilityChangedHandler(
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
179 new VisibilityChangedHandler() {
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
180 @Override
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
181 public void onVisibilityChanged(VisibilityChangedEvent event) {
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
182 mapPanel.doLayout(
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
183 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
184 }
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
185 });
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
186 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
187
915
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
188 parameterList.registerCollectionViewTabHandler(this);
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
189
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 axis = getLayer(
4632
02cf2b1dff84 Make floodmap riveraxis layer name configurable.
Christian Lins <christian.lins@intevation.de>
parents: 4574
diff changeset
191 mapInfo.getWmsUrl(), mapInfo.getWmsLayers(),
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
192 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
193 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
194 mapInfo.getBackgroundWmsUrl(), mapInfo.getBackgroundWmsLayers(),
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
195 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
196
4553
fac54b8470d4 Map view in DigitizePanel now shows OSM background, river axis and
Christian Lins <christian.lins@intevation.de>
parents: 4476
diff changeset
197 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
198 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
199
5312
2c1045a1e3fe Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents: 5032
diff changeset
200 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
201 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
202 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
203 //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
204 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
205 "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
206 mapInfo.getProjection(),
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
207 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
208 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
209 }
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
210 String userRgd = getDataValue(
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
211 "state.winfo.uesk.user-rgd", "uesk.user-rgd");
5312
2c1045a1e3fe Added new states and transitions to UESK calculation and adjusted states and UI.
Raimund Renkert <rrenkert@intevation.de>
parents: 5032
diff changeset
212 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
213 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
214 //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
215 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
216 "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
217 mapInfo.getProjection(),
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
218 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
219 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
220 }
5032
4bf3b89b38d5 Added attribution to osm wms background layer.
Raimund Renkert <rrenkert@intevation.de>
parents: 5008
diff changeset
221 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
222 map.zoomToMaxExtent();
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
223
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
224 mapPanel.doLayout(
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
225 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
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
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
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
229 protected WMS getLayer(
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
230 String url,
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
231 String layers,
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
232 String proj,
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
233 boolean isBaseLayer,
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
234 boolean singleTiled
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
235 ) {
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
236 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
237 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
238 params.setFormat("image/png");
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
239 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
240
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
241 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
242 opts.setProjection(proj);
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
243 opts.setSingleTile(false); // FIXME: Make working...
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
244 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
245 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
246 opts.setBuffer(0);
5032
4bf3b89b38d5 Added attribution to osm wms background layer.
Raimund Renkert <rrenkert@intevation.de>
parents: 5008
diff changeset
247 if (layers.equals("OSM-WMS-Dienst")) {
4bf3b89b38d5 Added attribution to osm wms background layer.
Raimund Renkert <rrenkert@intevation.de>
parents: 5008
diff changeset
248 opts.setAttribution(MSG.attribution());
4bf3b89b38d5 Added attribution to osm wms background layer.
Raimund Renkert <rrenkert@intevation.de>
parents: 5008
diff changeset
249 }
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
250 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
251 wms.setIsVisible(true);
5612
4f935415bb20 Hopefully fix for some map resizing issues.
Christian Lins <christian.lins@intevation.de>
parents: 5539
diff changeset
252 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
253
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
254 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
255 }
915
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
256
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
257
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
258 @Override
915
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
259 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
260 if (tse.getTabNum () != 0) {
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
261 floodMap.hideBarrierLayer();
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
262 }
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
263 else {
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
264 floodMap.showBarrierLayer();
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
265 }
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 873
diff changeset
266 }
1389
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
267
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 2494
diff changeset
268 @Override
1389
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
269 public void onVisibilityChanged(VisibilityChangedEvent vce) {
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
270 if (!vce.getIsVisible()) {
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
271 floodMap.hideBarrierLayer();
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
272 mapPanel.getMapToolbar().activateDrawFeature(false);
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
273 }
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
274 else {
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
275 floodMap.showBarrierLayer();
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
276 }
d29a9fa10313 Issue 265.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1322
diff changeset
277 }
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
278 }
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
279 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org