annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/DistancePanel.java @ 782:4a7ece57f44c

#159 The tables in the WQ panel for calculation 4 are now filled with data. flys-client/trunk@2273 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 01 Jul 2011 08:44:24 +0000
parents 6653cf54b45d
children 8ebaad41285b
rev   line source
780
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.client.client.ui;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
3 import java.util.ArrayList;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4 import java.util.List;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
6 import com.google.gwt.core.client.GWT;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7 import com.google.gwt.i18n.client.NumberFormat;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9 import com.smartgwt.client.widgets.Canvas;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10 import com.smartgwt.client.widgets.Label;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11 import com.smartgwt.client.widgets.form.fields.events.BlurHandler;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12 import com.smartgwt.client.widgets.form.fields.events.BlurEvent;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13 import com.smartgwt.client.widgets.layout.HLayout;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 import com.smartgwt.client.widgets.layout.VLayout;
781
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
15 import com.smartgwt.client.widgets.tab.TabSet;
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
16 import com.smartgwt.client.widgets.tab.Tab;
780
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17
782
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
18 import de.intevation.flys.client.shared.model.ArtifactDescription;
780
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19 import de.intevation.flys.client.shared.model.Data;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20 import de.intevation.flys.client.shared.model.DataItem;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21 import de.intevation.flys.client.shared.model.DataList;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22 import de.intevation.flys.client.shared.model.DefaultData;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23 import de.intevation.flys.client.shared.model.DefaultDataItem;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24
782
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
25 import de.intevation.flys.client.client.Config;
780
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26 import de.intevation.flys.client.client.FLYSConstants;
782
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
27 import de.intevation.flys.client.client.ui.range.DistanceInfoDataSource;
781
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
28 import de.intevation.flys.client.client.ui.range.RangeTable;
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
29 import de.intevation.flys.client.client.ui.range.LocationsTable;
780
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32 public class DistancePanel extends AbstractUIProvider implements BlurHandler {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
33
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34 public static final int DEFAULT_STEP_WIDTH = 100;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37 protected FLYSConstants MSG = GWT.create(FLYSConstants.class);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38
781
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
39 protected RangeTable distancesTable;
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
40 protected LocationsTable locationsTable;
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
41
780
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
42 protected DoubleRangePanel distancePanel;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
43
781
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
44 protected TabSet tabs;
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
45
780
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
46 protected double min;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
47 protected double max;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
50 public DistancePanel() {
781
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
51 distancesTable = new RangeTable();
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
52 locationsTable = new LocationsTable();
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
53 distancePanel = new DoubleRangePanel(
780
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
54 MSG.unitFrom(), MSG.unitTo(), MSG.unitWidth(),
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
55 0d, 0d, 0d, 250, this);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
56 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
57
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
58
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
59 @Override
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
60 public Canvas create(DataList data) {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
61 VLayout layout = new VLayout();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
62 layout.setMembersMargin(10);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
63
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
64 Label label = new Label(MSG.distance_state());
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
65
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
66 Canvas submit = getNextButton();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
67
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
68 label.setHeight(25);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
69 distancePanel.setHeight(50);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
70
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
71 layout.addMember(label);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
72 layout.addMember(distancePanel);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
73 layout.addMember(submit);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
74
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
75 initMinMaxValues(data);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
76 initDefaultValues(data);
781
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
77 initHelperPanel();
780
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
78
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
79 return layout;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
80 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
81
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
82
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
83 @Override
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
84 public Canvas createOld(DataList dataList) {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
85 String s = getOldSelectionString(dataList);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
86 String l = dataList.getLabel();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
87
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
88 Label label = new Label(l);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
89 Label selected = new Label(s);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
90
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
91 HLayout layout = new HLayout();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
92
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
93 layout.setWidth(400);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
94 label.setWidth(200);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
95 selected.setWidth(130);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
96
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
97 layout.addMember(label);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
98 layout.addMember(selected);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
99
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
100 return layout;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
101 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
102
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
103
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
104 protected String getOldSelectionString(DataList dataList) {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
105 List<Data> items = dataList.getAll();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
106
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
107 Data dFrom = getData(items, "ld_from");
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
108 Data dTo = getData(items, "ld_to");
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
109 Data dStep = getData(items, "ld_step");
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
110
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
111 DataItem[] from = dFrom.getItems();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
112 DataItem[] to = dTo.getItems();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
113 DataItem[] step = dStep.getItems();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
114
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
115 StringBuilder sb = new StringBuilder();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
116 sb.append(from[0].getLabel());
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
117 sb.append(" " + MSG.unitFrom() + " ");
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
118 sb.append(to[0].getLabel());
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
119 sb.append(" " + MSG.unitTo() + " ");
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
120 sb.append(step[0].getLabel());
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
121 sb.append(" " + MSG.unitWidth());
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
122
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
123 return sb.toString();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
124 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
125
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
126
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
127 @Override
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
128 public List<String> validate() {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
129 List<String> errors = new ArrayList<String>();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
130
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
131 if (!distancePanel.validateForm()) {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
132 errors.add(MSG.wrongFormat());
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
133
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
134 return errors;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
135 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
136
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
137 validateFrom(errors);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
138 validateTo(errors);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
139
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
140 return errors;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
141 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
142
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
143
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
144 protected void validateFrom(List<String> errors) {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
145 double from = distancePanel.getFrom();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
146
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
147 if (from < min || from > max) {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
148 NumberFormat nf = NumberFormat.getDecimalFormat();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
149
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
150 String tmp = MSG.error_validate_lower_range();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
151 tmp = tmp.replace("$1", nf.format(from));
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
152 tmp = tmp.replace("$2", nf.format(min));
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
153
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
154 distancePanel.setFrom(min);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
155 errors.add(tmp);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
156 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
157 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
158
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
159
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
160 protected void validateTo(List<String> errors) {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
161 double to = distancePanel.getTo();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
162
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
163 if (to < min || to > max) {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
164 NumberFormat nf = NumberFormat.getDecimalFormat();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
165
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
166 String tmp = MSG.error_validate_upper_range();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
167 tmp = tmp.replace("$1", nf.format(to));
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
168 tmp = tmp.replace("$2", nf.format(max));
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
169
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
170 distancePanel.setTo(max);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
171 errors.add(tmp);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
172 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
173 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
174
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
175
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
176 @Override
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
177 public Data[] getData() {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
178 Data[] data = new Data[3];
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
179
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
180 data[0] = getDataFrom();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
181 data[1] = getDataTo();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
182 data[2] = getDataStep();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
183
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
184 return data;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
185 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
186
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
187
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
188 protected Data getDataFrom() {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
189 String value = String.valueOf(distancePanel.getFrom());
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
190 DataItem item = new DefaultDataItem("ld_from", "ld_from", value);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
191 return new DefaultData(
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
192 "ld_from", null, null, new DataItem[] { item });
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
193 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
194
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
195
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
196 protected Data getDataTo() {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
197 String value = String.valueOf(distancePanel.getTo());
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
198 DataItem item = new DefaultDataItem("ld_to", "ld_to", value);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
199 return new DefaultData(
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
200 "ld_to", null, null, new DataItem[] { item });
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
201 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
202
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
203
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
204 protected Data getDataStep() {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
205 String value = String.valueOf(distancePanel.getStep());
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
206 DataItem item = new DefaultDataItem("ld_step","ld_step", value);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
207 return new DefaultData(
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
208 "ld_step", null, null, new DataItem[] { item });
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
209 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
210
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
211
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
212 @Override
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
213 public void onBlur(BlurEvent event) {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
214 distancePanel.validateForm();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
215 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
216
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
217
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
218 protected void initMinMaxValues(DataList data) {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
219 Data f = getData(data.getAll(), "ld_from");
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
220 Data t = getData(data.getAll(), "ld_to");
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
221
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
222 DataItem[] fItems = f.getItems();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
223 DataItem[] tItems = t.getItems();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
224
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
225 try {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
226 min = Double.valueOf(fItems[0].getStringValue());
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
227 max = Double.valueOf(tItems[0].getStringValue());
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
228 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
229 catch (NumberFormatException nfe) {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
230 min = -Double.MAX_VALUE;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
231 max = Double.MAX_VALUE;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
232 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
233 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
234
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
235
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
236 protected void initDefaultValues(DataList data) {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
237 initDefaultFrom(data);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
238 initDefaultTo(data);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
239 initDefaultStep(data);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
240 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
241
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
242
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
243 protected void initDefaultFrom(DataList data) {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
244 Data f = getData(data.getAll(), "ld_from");
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
245
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
246 double from = min;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
247
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
248 try {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
249 from = getDefaultValue(f);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
250 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
251 catch (NumberFormatException nfe) {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
252 // do nothing
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
253 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
254
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
255 distancePanel.setFrom(from);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
256 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
257
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
258
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
259 protected void initDefaultTo(DataList data) {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
260 Data t = getData(data.getAll(), "ld_to");
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
261
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
262 double to = max;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
263
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
264 try {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
265 to = getDefaultValue(t);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
266 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
267 catch (NumberFormatException nfe) {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
268 // do nothing
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
269 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
270
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
271 distancePanel.setTo(to);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
272 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
273
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
274
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
275 protected void initDefaultStep(DataList data) {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
276 Data s = getData(data.getAll(), "ld_step");
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
277
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
278 double step = (double) DEFAULT_STEP_WIDTH;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
279
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
280 try {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
281 step = getDefaultValue(s);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
282 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
283 catch (NumberFormatException nfe) {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
284 // do nothing
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
285 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
286
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
287 distancePanel.setStep(step);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
288 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
289
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
290
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
291 protected double getDefaultValue(Data data)
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
292 throws NumberFormatException
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
293 {
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
294 DataItem def = data.getDefault();
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
295 String defValue = def != null ? def.getStringValue() : null;
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
296
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
297 return Double.valueOf(defValue);
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
298 }
781
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
299
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
300
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
301 protected void initHelperPanel() {
782
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
302 Config config = Config.getInstance();
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
303 String url = config.getServerUrl();
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
304 String river = getRiverName();
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
305
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
306 distancesTable.setAutoFetchData(true);
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
307 locationsTable.setAutoFetchData(true);
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
308 distancesTable.setDataSource(new DistanceInfoDataSource(
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
309 url, river, "distances"));
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
310 locationsTable.setDataSource(new DistanceInfoDataSource(
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
311 url, river, "locations"));
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
312
781
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
313 tabs = new TabSet();
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
314 tabs.setWidth100();
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
315 tabs.setHeight100();
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
316
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
317 Tab locations = new Tab(MSG.locations());
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
318 Tab distances = new Tab(MSG.distance());
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
319
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
320 locations.setPane(locationsTable);
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
321 distances.setPane(distancesTable);
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
322
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
323 tabs.addTab(locations, 0);
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
324 tabs.addTab(distances, 1);
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
325
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
326 helperContainer.addChild(tabs);
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
327 }
782
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
328
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
329
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
330 protected String getRiverName() {
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
331 ArtifactDescription adescr = artifact.getArtifactDescription();
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
332 DataList[] data = adescr.getOldData();
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
333
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
334 if (data != null && data.length > 0) {
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
335 for (int i = 0; i < data.length; i++) {
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
336 DataList dl = data[i];
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
337
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
338 if (dl.getState().equals("state.winfo.river")) {
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
339 for (int j = 0; j < dl.size(); j++) {
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
340 Data d = dl.get(j);
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
341 DataItem[] di = d.getItems();
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
342
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
343 if (di != null && di.length == 1) {
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
344 return d.getItems()[0].getStringValue();
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
345 }
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
346 }
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
347 }
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
348 }
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
349 }
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
350
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
351 return null;
4a7ece57f44c #159 The tables in the WQ panel for calculation 4 are now filled with data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 781
diff changeset
352 }
780
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
353 }
a39c2f531755 Implemented a new panel to enter kilometer ranges (with no option to insert locations).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
354 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org