Mercurial > dive4elements > river
annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixFunctionSelect.java @ 5612:4f935415bb20
Hopefully fix for some map resizing issues.
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Tue, 09 Apr 2013 15:32:46 +0200 |
parents | 84a48acabd78 |
children |
rev | line source |
---|---|
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.client.client.ui.fixation; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
2 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
3 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
|
4 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
|
5 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
|
6 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
|
7 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
|
8 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
|
9 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
|
10 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
11 import de.intevation.flys.client.shared.model.Data; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
12 import de.intevation.flys.client.shared.model.DataItem; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
13 import de.intevation.flys.client.shared.model.DataList; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
14 import de.intevation.flys.client.shared.model.DefaultData; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
15 import de.intevation.flys.client.shared.model.DefaultDataItem; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
16 |
3846
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
17 import java.util.HashMap; |
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
18 import java.util.Iterator; |
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
19 import java.util.LinkedHashMap; |
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
20 import java.util.Map; |
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
21 |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
22 public class FixFunctionSelect extends FixationPanel { |
3846
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
23 private static final Map<String, String> funcDesc = new HashMap<String, String>(); |
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
24 |
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
25 static { |
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
26 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
|
27 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
|
28 funcDesc.put("log-linear", "W(Q) = a*ln(m*Q+b)"); |
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
29 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
|
30 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
|
31 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
|
32 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
|
33 } |
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
34 |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
35 /** The combobox.*/ |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
36 protected DynamicForm form; |
3366
8bedd1fcaeee
Removed trailing whitespace. Import cleanup
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3358
diff
changeset
|
37 |
3358
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
38 @Override |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
39 public Canvas createWidget(DataList data) { |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
40 VLayout layout = new VLayout(); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
41 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
|
42 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
|
43 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
44 LinkedHashMap initial = new LinkedHashMap(); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
45 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
46 form = new DynamicForm(); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
47 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
48 int size = data.size(); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
49 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
50 for (int i = 0; i < size; i++) { |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
51 Data d = data.get(i); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
52 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
53 Label label = new Label(d.getDescription()); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
54 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
|
55 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
|
56 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
|
57 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
58 SelectItem combobox = new SelectItem(d.getLabel()); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
59 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
|
60 |
3846
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
61 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
|
62 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
63 boolean defaultSet = false; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
64 boolean first = true; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
65 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
66 DataItem def = d.getDefault(); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
67 String defValue = def != null ? def.getStringValue() : null; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
68 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
69 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
|
70 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
|
71 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
|
72 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
73 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
74 // I was here. Me 2. |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
75 for (DataItem item: d.getItems()) { |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
76 if (!defaultSet && first) { |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
77 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
|
78 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
|
79 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
80 |
3846
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
81 funcTypes.put(item.getStringValue(), 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
|
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 label.setWidth(50); |
3846
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
85 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
|
86 combobox.setShowTitle(false); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
87 form.setItems(combobox); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
88 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
89 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
|
90 layout.addMember(form); |
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 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
93 form.setValues(initial); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
94 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
95 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
|
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 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
|
98 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
99 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
100 |
3846
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
101 @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
|
102 public Canvas createOld(DataList dataList) { |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
103 HLayout layout = new HLayout(); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
104 VLayout vLayout = new VLayout(); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
105 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
|
106 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
107 Label label = new Label(dataList.getLabel()); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
108 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
|
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 int size = dataList.size(); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
111 for (int i = 0; i < size; i++) { |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
112 Data data = dataList.get(i); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
113 DataItem[] items = data.getItems(); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
114 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
115 for (DataItem item: items) { |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
116 HLayout hLayout = new HLayout(); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
117 |
3846
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
118 String desc = funcDesc.containsKey(item.getLabel()) ? |
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
119 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
|
120 hLayout.addMember(label); |
3846
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
121 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
|
122 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
123 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
|
124 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
|
125 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
126 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
127 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
128 Canvas back = getBackButton(dataList.getState()); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
129 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
130 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
|
131 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
|
132 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
|
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 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
|
135 } |
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 |
3846
84a48acabd78
Show full function instead of internal function name (#873).
Christian Lins <christian.lins@intevation.de>
parents:
3366
diff
changeset
|
138 @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
|
139 public Data[] getData() { |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
140 Map values = form.getValues(); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
141 Iterator keys = values.keySet().iterator(); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
142 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
143 Data[] list = new Data[values.size()]; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
144 int i = 0; |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
145 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
146 while (keys.hasNext()) { |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
147 String fieldname = (String) keys.next(); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
148 String selection = (String) values.get(fieldname); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
149 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
150 DataItem item = new DefaultDataItem(fieldname, null, selection); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
151 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
152 list[i++] = new DefaultData( |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
153 fieldname, null, null, new DataItem[] { item }); |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
154 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
155 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
156 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
|
157 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
158 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
159 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
160 @Override |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
161 public void setValues(String cid, boolean checked) { |
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 @Override |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
165 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
|
166 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
|
167 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
168 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
169 @Override |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
170 public void success() { |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
171 } |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
172 |
65b71ddc7716
Show the overview and chart in function select state in fix analysis helper
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
173 } |