annotate gwt-client/src/main/java/org/dive4elements/river/client/client/ui/MultipleLocationPanel.java @ 8870:c26fb37899ca

Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui. Also using now the localization info from the server instead of localizing the modules again on the client side.
author gernotbelger
date Wed, 07 Feb 2018 11:59:13 +0100
parents 5e38e2924c07
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;
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
10
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
11 import com.google.gwt.core.client.GWT;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
12 import com.google.gwt.i18n.client.NumberFormat;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
13
4184
03de5c424f95 Fix warnings and minor TODOs in flys-client.
Christian Lins <christian.lins@intevation.de>
parents: 3539
diff changeset
14 import com.smartgwt.client.data.Record;
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
15 import com.smartgwt.client.util.SC;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
16 import com.smartgwt.client.widgets.Canvas;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
17 import com.smartgwt.client.widgets.Label;
4184
03de5c424f95 Fix warnings and minor TODOs in flys-client.
Christian Lins <christian.lins@intevation.de>
parents: 3539
diff changeset
18 import com.smartgwt.client.widgets.form.fields.events.BlurEvent;
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
19 import com.smartgwt.client.widgets.form.fields.events.BlurHandler;
4221
480de0dbca8e Extended location input helper.
Raimund Renkert <rrenkert@intevation.de>
parents: 4184
diff changeset
20 import com.smartgwt.client.widgets.grid.events.CellClickEvent;
480de0dbca8e Extended location input helper.
Raimund Renkert <rrenkert@intevation.de>
parents: 4184
diff changeset
21 import com.smartgwt.client.widgets.grid.events.CellClickHandler;
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
22 import com.smartgwt.client.widgets.layout.HLayout;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
23 import com.smartgwt.client.widgets.layout.VLayout;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
24
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
25 import org.dive4elements.river.client.client.Config;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
26 import org.dive4elements.river.client.client.services.DistanceInfoService;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
27 import org.dive4elements.river.client.client.services.DistanceInfoServiceAsync;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
28 import org.dive4elements.river.client.client.ui.range.DistanceInfoDataSource;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
29 import org.dive4elements.river.client.shared.DoubleUtils;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
30 import org.dive4elements.river.client.shared.model.ArtifactDescription;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
31 import org.dive4elements.river.client.shared.model.Data;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
32 import org.dive4elements.river.client.shared.model.DataItem;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
33 import org.dive4elements.river.client.shared.model.DataList;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
34 import org.dive4elements.river.client.shared.model.DistanceInfoObject;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
35 import org.dive4elements.river.client.shared.model.RangeData;
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
36
4184
03de5c424f95 Fix warnings and minor TODOs in flys-client.
Christian Lins <christian.lins@intevation.de>
parents: 3539
diff changeset
37 import java.util.ArrayList;
03de5c424f95 Fix warnings and minor TODOs in flys-client.
Christian Lins <christian.lins@intevation.de>
parents: 3539
diff changeset
38 import java.util.List;
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
39
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
40
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
41 /**
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
42 * This UIProvider creates a widget to enter a single location (km).
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
43 *
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
44 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
45 */
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
46 public class MultipleLocationPanel
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
47 extends LocationPanel
4221
480de0dbca8e Extended location input helper.
Raimund Renkert <rrenkert@intevation.de>
parents: 4184
diff changeset
48 implements CellClickHandler
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
49 {
4184
03de5c424f95 Fix warnings and minor TODOs in flys-client.
Christian Lins <christian.lins@intevation.de>
parents: 3539
diff changeset
50 private static final long serialVersionUID = -3359966826794082718L;
03de5c424f95 Fix warnings and minor TODOs in flys-client.
Christian Lins <christian.lins@intevation.de>
parents: 3539
diff changeset
51
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
52 /** The DistanceInfoService used to retrieve locations about rivers. */
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
53 protected DistanceInfoServiceAsync distanceInfoService =
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
54 GWT.create(DistanceInfoService.class);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
55
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
56 /** The table data. */
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
57 protected DistanceInfoObject[] tableData;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
58
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
59 /** The input helper (usually right side, table to click on, values are
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
60 * then entered in the texfield. */
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
61 protected LocationPicker picker;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
62
1615
07c38d054f91 Translate data item in locationpanel label.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1612
diff changeset
63
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
64 /**
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
65 * Creates a new LocationDistancePanel instance.
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
66 */
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
67 public MultipleLocationPanel() {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
68 picker = new LocationPicker(this);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
69 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
70
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
71
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
72 /**
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
73 * This method creates a widget that contains a label, a panel with
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
74 * checkboxes to switch the input mode between location and distance input,
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
75 * and a mode specific panel.
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
76 *
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
77 * @param data The data that might be inserted.
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
78 *
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
79 * @return a panel.
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
80 */
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
81 @Override
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
82 public Canvas create(DataList data) {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
83 findDataItemName(data);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
84
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
85 VLayout layout = new VLayout();
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
86 layout.setMembersMargin(10);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
87
1615
07c38d054f91 Translate data item in locationpanel label.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1612
diff changeset
88 // Take translated data item name as label, if translation available.
07c38d054f91 Translate data item in locationpanel label.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1612
diff changeset
89 String labelString;
07c38d054f91 Translate data item in locationpanel label.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1612
diff changeset
90 try {
07c38d054f91 Translate data item in locationpanel label.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1612
diff changeset
91 labelString = MSG.getString(getDataItemName());
07c38d054f91 Translate data item in locationpanel label.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1612
diff changeset
92 }
07c38d054f91 Translate data item in locationpanel label.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1612
diff changeset
93 catch(java.util.MissingResourceException mre) {
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
94 GWT.log("Cannot find translation for data item name : "
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
95 + getDataItemName());
3493
e703555f8da1 Issue 752.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2905
diff changeset
96 labelString = getLabelString();
1615
07c38d054f91 Translate data item in locationpanel label.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1612
diff changeset
97 }
07c38d054f91 Translate data item in locationpanel label.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1612
diff changeset
98 Label label = new Label(labelString);
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
99 Canvas widget = createWidget(data);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
100 Canvas submit = getNextButton();
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
101
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
102 initDefaults(data);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
103
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
104 picker.createLocationTable();
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
105
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
106 widget.setHeight(50);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
107 label.setHeight(25);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
108
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
109 layout.addMember(label);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
110 layout.addMember(widget);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
111 layout.addMember(submit);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
112
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
113 return layout;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
114 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
115
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
116
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
117 /**
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
118 * This method reads the default values defined in the DataItems of the Data
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
119 * objects in <i>list</i>.
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
120 *
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
121 * @param list The DataList container that stores the Data objects.
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
122 */
4184
03de5c424f95 Fix warnings and minor TODOs in flys-client.
Christian Lins <christian.lins@intevation.de>
parents: 3539
diff changeset
123 @Override
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
124 protected void initDefaults(DataList list) {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
125 Data data = list.get(0);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
126
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
127 // Compatibility with MinMax- DataItems:
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
128 RangeData rangeData = null;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
129
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
130 for (int i = 0, n = list.size(); i < n; i++) {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
131 Data tmp = list.get(i);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
132
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
133 if (tmp instanceof RangeData) {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
134 rangeData = (RangeData) tmp;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
135 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
136 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
137
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
138 if (rangeData != null) {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
139 min = Double.parseDouble(rangeData.getDefaultLower().toString());
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
140 max = Double.parseDouble(rangeData.getDefaultUpper().toString());
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
141 // catch ..?
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
142 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
143 else {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
144 DataItem[] items = data.getItems();
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
145 DataItem iMin = getDataItem(items, "min");
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
146 DataItem iMax = getDataItem(items, "max");
2905
51ed89b754ae FLYS client: Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2898
diff changeset
147
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
148 try {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
149 min = Double.parseDouble(iMin.getStringValue());
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
150 max = Double.parseDouble(iMax.getStringValue());
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
151 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
152 catch (NumberFormatException nfe) {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
153 SC.warn(MSG.error_read_minmax_values());
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
154 min = -Double.MAX_VALUE;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
155 max = Double.MAX_VALUE;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
156 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
157 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
158
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
159 DataItem def = data.getDefault();
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
160 if (def != null) {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
161 String value = def.getStringValue();
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
162
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
163 try {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
164 double d = Double.parseDouble(value);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
165 setLocationValues(new double[] { d } );
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
166 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
167 catch (NumberFormatException nfe) {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
168 // could not parse, dont know what to do else
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
169 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
170 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
171 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
172
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
173
4184
03de5c424f95 Fix warnings and minor TODOs in flys-client.
Christian Lins <christian.lins@intevation.de>
parents: 3539
diff changeset
174 @Override
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
175 protected Canvas createWidget(DataList data) {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
176 VLayout layout = new VLayout();
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
177 inputLayout = new HLayout();
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
178
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
179 // The initial view will display the location input mode.
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
180 locationPanel = new DoubleArrayPanel(
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
181 MSG.unitLocation(),
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
182 getLocationValues(),
4184
03de5c424f95 Fix warnings and minor TODOs in flys-client.
Christian Lins <christian.lins@intevation.de>
parents: 3539
diff changeset
183 new BlurHandler(){@Override
03de5c424f95 Fix warnings and minor TODOs in flys-client.
Christian Lins <christian.lins@intevation.de>
parents: 3539
diff changeset
184 public void onBlur(BlurEvent be) {validate();}});
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
185
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
186 picker.getLocationTable().setAutoFetchData(true);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
187
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
188 inputLayout.addMember(locationPanel);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
189
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
190 layout.addMember(inputLayout);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
191
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
192 inputLayout.setMembersMargin(30);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
193
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
194 picker.prepareFilter();
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
195
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
196 helperContainer.addMember(picker.getLocationTable());
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
197 helperContainer.addMember(picker.getFilterLayout());
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
198 helperContainer.addMember(picker.getResultCountForm());
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
199 setPickerDataSource();
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
200 return layout;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
201 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
202
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
203
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
204 /** Overridden to restrict to one entered value. */
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
205 @Override
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
206 public List<String> validate() {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
207 List<String> errors = new ArrayList<String>();
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
208 NumberFormat nf = NumberFormat.getDecimalFormat();
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
209
3539
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
210 DataList[] ref = artifact.getArtifactDescription().getOldData();
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
211 String mode = ref[1].get(0).getStringValue();
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
212
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
213 saveLocationValues(locationPanel);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
214
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
215 if (!locationPanel.validateForm()) {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
216 errors.add(MSG.wrongFormat());
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
217 return errors;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
218 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
219
1618
95b821d63db3 Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1617
diff changeset
220 double[] lValues = getLocationValues();
95b821d63db3 Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1617
diff changeset
221 double[] good = new double[lValues.length];
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
222 int idx = 0;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
223
3539
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
224 double reference =
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
225 Double.valueOf(ref[2].get(0).getStringValue()).doubleValue();
1618
95b821d63db3 Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1617
diff changeset
226 for (double value: lValues) {
3539
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
227 if (mode.equals("calc.reference.curve") &&
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
228 value == reference) {
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
229 errors.add(MSG.error_contains_same_location());
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
230 return errors;
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
231 }
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
232 if (value < min || value > max) {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
233 String tmp = MSG.error_validate_range();
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
234 tmp = tmp.replace("$1", nf.format(value));
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
235 tmp = tmp.replace("$2", nf.format(min));
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
236 tmp = tmp.replace("$3", nf.format(max));
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
237 errors.add(tmp);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
238 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
239 else {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
240 good[idx++] = value;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
241 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
242 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
243
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
244 double[] justGood = new double[idx];
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
245 for (int i = 0; i < justGood.length; i++) {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
246 justGood[i] = good[i];
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
247 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
248
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
249 if (!errors.isEmpty()) {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
250 locationPanel.setValues(justGood);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
251 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
252
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
253 return errors;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
254 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
255
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
256
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
257 /**
1615
07c38d054f91 Translate data item in locationpanel label.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1612
diff changeset
258 * This method returns the selected data (to feed).
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
259 *
1615
07c38d054f91 Translate data item in locationpanel label.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1612
diff changeset
260 * @return the selected/inserted data in feedable form.
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
261 */
4184
03de5c424f95 Fix warnings and minor TODOs in flys-client.
Christian Lins <christian.lins@intevation.de>
parents: 3539
diff changeset
262 @Override
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
263 public Data[] getData() {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
264 saveLocationValues(locationPanel);
1618
95b821d63db3 Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1617
diff changeset
265 double[] lValues = getLocationValues();
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
266 Data[] data = new Data[2];
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
267 boolean first = true;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
268 String valueString = "";
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
269
1618
95b821d63db3 Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1617
diff changeset
270 for (int i = 0; i < lValues.length; i++) {
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
271 if (!first) valueString += " ";
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
272 else first = false;
1618
95b821d63db3 Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1617
diff changeset
273 valueString += Double.valueOf(lValues[i]).toString();
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
274 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
275
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
276 data[0] = createDataArray(getDataItemName(), valueString);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
277
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
278 data[1] = createDataArray("ld_mode", "locations");
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
279
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
280 return data;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
281 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
282
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
283
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
284 /** Hook service to the listgrid with possible input values. */
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
285 protected void setPickerDataSource() {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
286 Config config = Config.getInstance();
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
287 String url = config.getServerUrl();
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
288 String river = "";
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
289
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
290 ArtifactDescription adescr = artifact.getArtifactDescription();
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
291 DataList[] data = adescr.getOldData();
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
292
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
293 // Try to find a "river" data item to set the source for the
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
294 // list grid.
2898
242b5c230707 Added UI for S-Q-relation parameters in minfo module.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1618
diff changeset
295 String dataFilter = "locations";
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
296 if (data != null && data.length > 0) {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
297 for (int i = 0; i < data.length; i++) {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
298 DataList dl = data[i];
2898
242b5c230707 Added UI for S-Q-relation parameters in minfo module.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1618
diff changeset
299 if (dl.getState().equals("state.minfo.river")) {
242b5c230707 Added UI for S-Q-relation parameters in minfo module.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1618
diff changeset
300 dataFilter = "measuringpoint";
242b5c230707 Added UI for S-Q-relation parameters in minfo module.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1618
diff changeset
301 }
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
302 if (dl.getState().equals("state.winfo.river") ||
2898
242b5c230707 Added UI for S-Q-relation parameters in minfo module.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1618
diff changeset
303 dl.getState().equals("state.chart.river") ||
242b5c230707 Added UI for S-Q-relation parameters in minfo module.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1618
diff changeset
304 dl.getState().equals("state.minfo.river")) {
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
305 for (int j = 0; j < dl.size(); j++) {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
306 Data d = dl.get(j);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
307 DataItem[] di = d.getItems();
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
308 if (di != null && di.length == 1) {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
309 river = d.getItems()[0].getStringValue();
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
310 break;
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
311 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
312 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
313 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
314 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
315 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
316
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
317 picker.getLocationTable().setDataSource(new DistanceInfoDataSource(
2898
242b5c230707 Added UI for S-Q-relation parameters in minfo module.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1618
diff changeset
318 url, river, dataFilter));
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
319 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
320
1615
07c38d054f91 Translate data item in locationpanel label.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1612
diff changeset
321
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
322 // TODO allow multiple selections here or in LocationPanel
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
323 /**
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
324 * Callback when an item from the input helper was clicked.
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
325 * Set the respective km-value in the location value field.
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
326 * @param e event passed.
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
327 */
4184
03de5c424f95 Fix warnings and minor TODOs in flys-client.
Christian Lins <christian.lins@intevation.de>
parents: 3539
diff changeset
328 @Override
4221
480de0dbca8e Extended location input helper.
Raimund Renkert <rrenkert@intevation.de>
parents: 4184
diff changeset
329 public void onCellClick (CellClickEvent e) {
1617
f13a7c126f24 Allow selection of multiple locations with mouse in MultipleLocationPanel.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1615
diff changeset
330 Record record = e.getRecord();
f13a7c126f24 Allow selection of multiple locations with mouse in MultipleLocationPanel.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1615
diff changeset
331 double[] old = getLocationValues();
f13a7c126f24 Allow selection of multiple locations with mouse in MultipleLocationPanel.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1615
diff changeset
332 double[] selected = DoubleUtils.copyOf(old, old.length + 1);
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
333 try {
1617
f13a7c126f24 Allow selection of multiple locations with mouse in MultipleLocationPanel.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1615
diff changeset
334 selected[old.length] =
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
335 Double.parseDouble(record.getAttribute("from"));
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
336 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
337 catch(NumberFormatException nfe) {
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
338 // Is there anything else to do here?
4184
03de5c424f95 Fix warnings and minor TODOs in flys-client.
Christian Lins <christian.lins@intevation.de>
parents: 3539
diff changeset
339 GWT.log(nfe.getMessage());
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
340 }
3539
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
341
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
342 // compare reference location and target location.
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
343 DataList[] ref = artifact.getArtifactDescription().getOldData();
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
344 String mode = ref[1].get(0).getStringValue();
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
345 if (mode.equals("calc.reference.curve") &&
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
346 ref[2].get(0).getStringValue().equals(record.getAttribute("from")))
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
347 {
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
348 SC.warn(MSG.error_same_location());
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
349 return;
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
350 }
091397efaca5 Issue 791: Do not allow the same values in reference and target location.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3493
diff changeset
351
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
352 setLocationValues(selected);
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
353 }
3493
e703555f8da1 Issue 752.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2905
diff changeset
354
4980
e70ff0a600a3 flys-client: Whitespace and doc cosemtics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4221
diff changeset
355
3493
e703555f8da1 Issue 752.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2905
diff changeset
356 /**
e703555f8da1 Issue 752.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2905
diff changeset
357 * Returns the label string for the input panel.
e703555f8da1 Issue 752.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2905
diff changeset
358 */
e703555f8da1 Issue 752.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2905
diff changeset
359 protected String getLabelString() {
e703555f8da1 Issue 752.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2905
diff changeset
360 return MSG.location();
e703555f8da1 Issue 752.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2905
diff changeset
361 }
1612
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
362 }
66671b69c7ea Added new UIProvider to enter mutliple locations (yet only input view textfield possible).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
363 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org