Mercurial > dive4elements > river
annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/ModuleSelection.java @ 1620:4a86c250d6a5
Fix flys/issue481 (i18n: Datenkorb).
flys-client/trunk@4007 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 09 Feb 2012 15:49:55 +0000 |
parents | 77fdb2359ef4 |
children | 6455bb59a26e |
rev | line source |
---|---|
30
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.client.client.ui; |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
45
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
3 import java.util.LinkedHashMap; |
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
4 |
30
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 import com.google.gwt.core.client.GWT; |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 |
83
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
7 import com.smartgwt.client.types.VerticalAlignment; |
30
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 import com.smartgwt.client.widgets.Canvas; |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 import com.smartgwt.client.widgets.Label; |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 import com.smartgwt.client.widgets.form.DynamicForm; |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import com.smartgwt.client.widgets.form.fields.RadioGroupItem; |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 import com.smartgwt.client.widgets.layout.HLayout; |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 import com.smartgwt.client.widgets.layout.VLayout; |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 import de.intevation.flys.client.shared.model.Data; |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 import de.intevation.flys.client.shared.model.DataItem; |
51
a2923d63f530
Introduced a data structure DataList to manage to list of Data objects of a single state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
45
diff
changeset
|
17 import de.intevation.flys.client.shared.model.DataList; |
30
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 import de.intevation.flys.client.shared.model.DefaultData; |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 import de.intevation.flys.client.shared.model.DefaultDataItem; |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 |
211
b92281182c6b
Removed the FLYSMessages interface and replaced it with a FLYSConstants interface - this interface has the ability to lookup i18n strings with given keys.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
86
diff
changeset
|
21 import de.intevation.flys.client.client.FLYSConstants; |
30
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 /** |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 * The ModuleSelection combines the river selection and the module selection in |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 * one widget. It will display a vertical splitted widget - the upper part will |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 * render checkboxes for each module, the lower one will display a combobox at |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 * the left and a map panel on the right to choose the river. |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 * |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 */ |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 public class ModuleSelection extends MapSelection { |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 /** The message class that provides i18n strings.*/ |
211
b92281182c6b
Removed the FLYSMessages interface and replaced it with a FLYSConstants interface - this interface has the ability to lookup i18n strings with given keys.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
86
diff
changeset
|
34 protected FLYSConstants MESSAGES = GWT.create(FLYSConstants.class); |
30
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 |
45
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
36 |
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
37 /** Constant field name for the plugin selection.*/ |
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
38 public static final String FIELD_PLUGIN = "plugin"; |
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
39 |
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
40 /** Constant value for the WINFO plugin.*/ |
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
41 public static final String FIELD_PLUGIN_WINFO = "winfo"; |
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
42 |
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
43 /** Constant value for the MINFO plugin.*/ |
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
44 public static final String FIELD_PLUGIN_MINFO = "minfo"; |
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
45 |
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
46 /** Constant value for the MAP plugin.*/ |
1516
102e472bd2a1
Changed the visible i18n strings for module 'new map.'
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1467
diff
changeset
|
47 public static final String FIELD_PLUGIN_MAP = "new_map"; |
45
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
48 |
86
eae92a05282e
Added a further plugin in the module selection and changed its alignment to vertical.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
83
diff
changeset
|
49 /** Constant value for the CHART plugin.*/ |
1520
77fdb2359ef4
Changed internal string for new chart module.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1516
diff
changeset
|
50 public static final String FIELD_PLUGIN_CHART = "new_chart"; |
86
eae92a05282e
Added a further plugin in the module selection and changed its alignment to vertical.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
83
diff
changeset
|
51 |
45
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
52 /** Constant value for the FIX plugin.*/ |
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
53 public static final String FIELD_PLUGIN_FIX = "fix"; |
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
54 |
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
55 |
30
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 /** The module checkboxes.*/ |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 protected RadioGroupItem radio; |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 /** |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 * The default constructor. |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 */ |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 public ModuleSelection() { |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 } |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 /** |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 * This method returns a widget that renders the checkboxes for each module |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 * and the MapSelection that lets the user choose the river. |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 * |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
71 * @param data The provided rivers. |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 * |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 * @return the module selection combined with the river selection. |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 */ |
51
a2923d63f530
Introduced a data structure DataList to manage to list of Data objects of a single state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
45
diff
changeset
|
75 public Canvas create(DataList data) { |
30
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 VLayout newLayout = new VLayout(); |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 newLayout.setMembersMargin(10); |
282
e92f7ef455d6
Show rivers as links instead of a combobox.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
211
diff
changeset
|
78 newLayout.setAlign(VerticalAlignment.TOP); |
30
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 Canvas moduleSelection = createWidget(); |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 |
282
e92f7ef455d6
Show rivers as links instead of a combobox.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
211
diff
changeset
|
81 moduleSelection.setHeight(100); |
e92f7ef455d6
Show rivers as links instead of a combobox.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
211
diff
changeset
|
82 newLayout.setHeight(70); |
30
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 newLayout.addMember(moduleSelection); |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 return newLayout; |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 } |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 /** |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
90 * Creates a widget that displays a checkbox for each module. |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
91 * |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
92 * @return a widget with checkboxes. |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
93 */ |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
94 protected Canvas createWidget() { |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 HLayout layout = new HLayout(); |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
96 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
97 Label label = new Label(MESSAGES.module_selection()); |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
98 DynamicForm form = new DynamicForm(); |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
99 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
100 radio = new RadioGroupItem("plugin"); |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
101 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
102 label.setWidth(50); |
282
e92f7ef455d6
Show rivers as links instead of a combobox.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
211
diff
changeset
|
103 label.setHeight(25); |
30
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
104 |
45
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
105 LinkedHashMap values = new LinkedHashMap(); |
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
106 values.put(FIELD_PLUGIN_WINFO, messages.winfo()); |
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
107 values.put(FIELD_PLUGIN_MINFO, messages.minfo()); |
86
eae92a05282e
Added a further plugin in the module selection and changed its alignment to vertical.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
83
diff
changeset
|
108 values.put(FIELD_PLUGIN_FIX, messages.fix()); |
1467
3adfb0f88eca
Changed i18n strings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
522
diff
changeset
|
109 values.put(FIELD_PLUGIN_CHART, messages.new_chart()); |
1516
102e472bd2a1
Changed the visible i18n strings for module 'new map.'
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1467
diff
changeset
|
110 values.put(FIELD_PLUGIN_MAP, messages.new_map()); |
45
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
111 |
30
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
112 radio.setShowTitle(false); |
86
eae92a05282e
Added a further plugin in the module selection and changed its alignment to vertical.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
83
diff
changeset
|
113 radio.setVertical(true); |
45
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
114 radio.setValueMap(values); |
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
115 |
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
116 LinkedHashMap initial = new LinkedHashMap(); |
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
117 initial.put(FIELD_PLUGIN, FIELD_PLUGIN_WINFO); |
30
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
118 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
119 form.setFields(radio); |
45
f99c5f8e4672
Some GUI improvements in the Location/Distance, W/Q and Module panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
120 form.setValues(initial); |
30
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
121 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
122 layout.addMember(label); |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
123 layout.addMember(form); |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
124 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
125 return layout; |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
126 } |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
127 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
128 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
129 /** |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
130 * This method prepares the data of two widgets - the module selection and |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
131 * the river selection. The returning field will contain the Data that |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
132 * represents the module selection at first position, the second position |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
133 * stores the Data object that represents the river selection. |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
134 * |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
135 * @return the Data that was chosen in this widget. |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
136 */ |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
137 protected Data[] getData() { |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
138 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
139 String module = radio.getValueAsString(); |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
140 |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
141 DataItem[] items = new DefaultDataItem[1]; |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
142 items[0] = new DefaultDataItem(module, module, module); |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
143 |
51
a2923d63f530
Introduced a data structure DataList to manage to list of Data objects of a single state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
45
diff
changeset
|
144 Data data = new DefaultData("module", null, null, items); |
30
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
145 |
282
e92f7ef455d6
Show rivers as links instead of a combobox.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
211
diff
changeset
|
146 return new Data[] {data}; |
30
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
147 } |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
148 } |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
149 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |