Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/SelectProvider.java @ 53:3d5d7788d471
The widgets in the static part of the parameter panel are created using UIProviders now. The ParameterList does not build widgets any longer.
flys-client/trunk@1509 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 17 Mar 2011 18:34:20 +0000 |
parents | a2923d63f530 |
children | 246af33f621c |
comparison
equal
deleted
inserted
replaced
52:1d0be51ab93b | 53:3d5d7788d471 |
---|---|
10 import com.smartgwt.client.widgets.Canvas; | 10 import com.smartgwt.client.widgets.Canvas; |
11 import com.smartgwt.client.widgets.IButton; | 11 import com.smartgwt.client.widgets.IButton; |
12 import com.smartgwt.client.widgets.Label; | 12 import com.smartgwt.client.widgets.Label; |
13 import com.smartgwt.client.widgets.form.DynamicForm; | 13 import com.smartgwt.client.widgets.form.DynamicForm; |
14 import com.smartgwt.client.widgets.form.fields.ComboBoxItem; | 14 import com.smartgwt.client.widgets.form.fields.ComboBoxItem; |
15 import com.smartgwt.client.widgets.layout.HLayout; | |
15 import com.smartgwt.client.widgets.layout.VLayout; | 16 import com.smartgwt.client.widgets.layout.VLayout; |
16 | 17 |
17 import de.intevation.flys.client.shared.model.Data; | 18 import de.intevation.flys.client.shared.model.Data; |
18 import de.intevation.flys.client.shared.model.DataItem; | 19 import de.intevation.flys.client.shared.model.DataItem; |
19 import de.intevation.flys.client.shared.model.DataList; | 20 import de.intevation.flys.client.shared.model.DataList; |
59 | 60 |
60 return v; | 61 return v; |
61 } | 62 } |
62 | 63 |
63 | 64 |
65 public Canvas createOld(DataList dataList) { | |
66 HLayout layout = new HLayout(); | |
67 VLayout vLayout = new VLayout(); | |
68 | |
69 Label label = new Label(dataList.getLabel()); | |
70 label.setWidth("50%"); | |
71 | |
72 int size = dataList.size(); | |
73 for (int i = 0; i < size; i++) { | |
74 Data data = dataList.get(i); | |
75 DataItem[] items = data.getItems(); | |
76 | |
77 for (DataItem item: items) { | |
78 HLayout hLayout = new HLayout(); | |
79 | |
80 hLayout.addMember(label); | |
81 hLayout.addMember(new Label(item.getStringValue())); | |
82 | |
83 vLayout.addMember(hLayout); | |
84 } | |
85 } | |
86 | |
87 layout.addMember(label); | |
88 layout.addMember(vLayout); | |
89 | |
90 return layout; | |
91 } | |
92 | |
93 | |
64 /** | 94 /** |
65 * This method creates the content of the widget. | 95 * This method creates the content of the widget. |
66 * | 96 * |
67 * @param data The {@link Data} object. | 97 * @param data The {@link Data} object. |
68 * | 98 * |
80 for (int i = 0; i < size; i++) { | 110 for (int i = 0; i < size; i++) { |
81 Data d = data.get(i); | 111 Data d = data.get(i); |
82 | 112 |
83 Label label = new Label(d.getDescription()); | 113 Label label = new Label(d.getDescription()); |
84 label.setValign(VerticalAlignment.TOP); | 114 label.setValign(VerticalAlignment.TOP); |
115 label.setHeight(20); | |
85 | 116 |
86 ComboBoxItem combobox = new ComboBoxItem(d.getLabel()); | 117 ComboBoxItem combobox = new ComboBoxItem(d.getLabel()); |
87 | 118 |
88 LinkedHashMap<String, String> it = new LinkedHashMap<String, String>(); | 119 LinkedHashMap<String, String> it = new LinkedHashMap<String, String>(); |
89 | 120 |