Mercurial > dive4elements > river
annotate gwt-client/src/main/java/org/dive4elements/river/client/client/ui/fixation/FixFunctionSelect.java @ 9646:0380717105ba
Implemented alternative fitting strategy for Log-Linear function.
author | Gernot Belger <g.belger@bjoernsen.de> |
---|---|
date | Mon, 02 Dec 2019 17:56:15 +0100 |
parents | 58f3fe98fd6b |
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.fixation; |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
10 |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
11 import java.util.LinkedHashMap; |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
12 import java.util.Map; |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
13 |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
14 import org.dive4elements.river.client.shared.model.Data; |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
15 import org.dive4elements.river.client.shared.model.DataItem; |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
16 import org.dive4elements.river.client.shared.model.DataList; |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
17 import org.dive4elements.river.client.shared.model.DefaultData; |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
18 import org.dive4elements.river.client.shared.model.DefaultDataItem; |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
19 import org.dive4elements.river.client.shared.model.FixingsOverviewInfo; |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
20 |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
21 import com.smartgwt.client.types.VerticalAlignment; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
22 import com.smartgwt.client.widgets.Canvas; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
23 import com.smartgwt.client.widgets.Label; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
24 import com.smartgwt.client.widgets.form.DynamicForm; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
25 import com.smartgwt.client.widgets.form.fields.SelectItem; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
26 import com.smartgwt.client.widgets.layout.HLayout; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
27 import com.smartgwt.client.widgets.layout.VLayout; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
28 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
29 public class FixFunctionSelect extends FixationPanel { |
9481 | 30 public static final LinkedHashMap<String, String> funcDesc = new LinkedHashMap<String, String>(); |
3846
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
31 |
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
32 static { |
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
33 funcDesc.put("log", "W(Q) = m*ln(Q + b)"); |
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
34 funcDesc.put("linear", "W(Q) = m * Q + b"); |
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
35 funcDesc.put("log-linear", "W(Q) = a*ln(m*Q+b)"); |
9646
0380717105ba
Implemented alternative fitting strategy for Log-Linear function.
Gernot Belger <g.belger@bjoernsen.de>
parents:
9643
diff
changeset
|
36 funcDesc.put("log-linear-linearisiert", "W(Q) = a*ln(m*Q+b) (linearisiert)"); |
3846
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
37 funcDesc.put("exp", "W(Q) = m * a^Q + b"); |
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
38 funcDesc.put("quad", "W(Q) = n*Q^2+m*Q+b"); |
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
39 funcDesc.put("pow", "W(Q) = a * Q^c + d"); |
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
40 funcDesc.put("sq-pow", "S(Q) = a * Q^b"); |
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
41 } |
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
42 |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
43 /** The combobox. */ |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
44 protected DynamicForm form; |
3366
8bedd1fcaeee
Removed trailing whitespace. Import cleanup
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3358
diff
changeset
|
45 |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
46 @Override |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
47 public Canvas createWidget(final DataList data) { |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
48 final VLayout layout = new VLayout(); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
49 layout.setAlign(VerticalAlignment.TOP); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
50 layout.setHeight(25); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
51 |
9481 | 52 final LinkedHashMap<String, String> initial = new LinkedHashMap<String, String>(); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
53 |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
54 this.form = new DynamicForm(); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
55 |
9526
51212d40ff56
Set default fitting function to log-inear („W(Q)=a*ln(m*Q+b)“)
gernotbelger
parents:
9481
diff
changeset
|
56 final int selectIndex = 2; |
9481 | 57 |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
58 final int size = data.size(); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
59 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
60 for (int i = 0; i < size; i++) { |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
61 final Data d = data.get(i); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
62 |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
63 final Label label = new Label(d.getDescription()); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
64 label.setValign(VerticalAlignment.TOP); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
65 label.setHeight(20); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
66 label.setWidth(400); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
67 |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
68 final SelectItem combobox = new SelectItem(d.getLabel()); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
69 combobox.setWidth(250); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
70 |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
71 final LinkedHashMap<String, String> funcTypes = new LinkedHashMap<String, String>(); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
72 |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
73 boolean defaultSet = false; |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
74 boolean first = true; |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
75 |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
76 final DataItem def = d.getDefault(); |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
77 final String defValue = def != null ? def.getStringValue() : null; |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
78 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
79 if (defValue != null && defValue.length() > 0) { |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
80 initial.put(d.getLabel(), def.getStringValue()); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
81 defaultSet = true; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
82 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
83 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
84 // I was here. Me 2. |
9481 | 85 int j = 0; |
86 assert selectIndex < d.getItems().length; | |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
87 for (final DataItem item : d.getItems()) { |
9481 | 88 if (!defaultSet && first && j == selectIndex) { |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
89 initial.put(d.getLabel(), item.getStringValue()); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
90 first = false; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
91 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
92 |
3846
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
93 funcTypes.put(item.getStringValue(), item.getLabel()); |
9481 | 94 j++; |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
95 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
96 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
97 label.setWidth(50); |
3846
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
98 combobox.setValueMap(funcTypes); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
99 combobox.setShowTitle(false); |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
100 this.form.setItems(combobox); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
101 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
102 layout.addMember(label); |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
103 layout.addMember(this.form); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
104 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
105 |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
106 this.form.setValues(initial); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
107 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
108 layout.setAlign(VerticalAlignment.TOP); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
109 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
110 return layout; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
111 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
112 |
3846
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
113 @Override |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
114 public Canvas createOld(final DataList dataList) { |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
115 final HLayout layout = new HLayout(); |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
116 final VLayout vLayout = new VLayout(); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
117 layout.setWidth("400px"); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
118 |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
119 final Label label = new Label(dataList.getLabel()); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
120 label.setWidth("200px"); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
121 |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
122 final int size = dataList.size(); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
123 for (int i = 0; i < size; i++) { |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
124 final Data data = dataList.get(i); |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
125 final DataItem[] items = data.getItems(); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
126 |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
127 for (final DataItem item : items) { |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
128 final HLayout hLayout = new HLayout(); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
129 |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
130 final String desc = funcDesc.containsKey(item.getLabel()) ? funcDesc.get(item.getLabel()) : item.getLabel(); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
131 hLayout.addMember(label); |
3846
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
132 hLayout.addMember(new Label(desc)); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
133 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
134 vLayout.addMember(hLayout); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
135 vLayout.setWidth("130px"); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
136 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
137 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
138 |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
139 final Canvas back = getBackButton(dataList.getState()); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
140 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
141 layout.addMember(label); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
142 layout.addMember(vLayout); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
143 layout.addMember(back); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
144 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
145 return layout; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
146 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
147 |
3846
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
148 @Override |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
149 public Data[] getData() { |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
150 final Map<?, ?> values = this.form.getValues(); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
151 |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
152 final Data[] list = new Data[values.size()]; |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
153 int i = 0; |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
154 |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
155 for (final Map.Entry<?, ?> entry : values.entrySet()) { |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
156 final String fieldname = (String) entry.getKey(); |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
157 final String selection = (String) entry.getValue(); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
158 |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
159 final DataItem item = new DefaultDataItem(fieldname, null, selection); |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
160 |
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
161 list[i++] = new DefaultData(fieldname, null, null, new DataItem[] { item }); |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
162 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
163 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
164 return list; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
165 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
166 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
167 @Override |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
168 public void setValues(final String cid, final boolean checked) { |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
169 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
170 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
171 @Override |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
172 public boolean renderCheckboxes() { |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
173 return false; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
174 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
175 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
176 @Override |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
177 public void success(final FixingsOverviewInfo fixInfo) { |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
178 } |
9256
6c24c857ccf9
fixation refactoring and inputItem behaviour to interfaces
gernotbelger
parents:
8856
diff
changeset
|
179 } |