Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/SelectProvider.java @ 38:7142386e86c2
Some improvements for displaying old parameters.
flys-client/trunk@1471 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 14 Mar 2011 18:09:21 +0000 |
parents | b6b89ff1adee |
children | d573ae975330 |
comparison
equal
deleted
inserted
replaced
37:b6b89ff1adee | 38:7142386e86c2 |
---|---|
43 protected List<StepForwardHandler> forwardHandlers; | 43 protected List<StepForwardHandler> forwardHandlers; |
44 | 44 |
45 /** The combobox.*/ | 45 /** The combobox.*/ |
46 protected ComboBoxItem combobox; | 46 protected ComboBoxItem combobox; |
47 | 47 |
48 /** The name of the data object.*/ | |
49 protected String dataName; | |
50 | |
48 | 51 |
49 /** | 52 /** |
50 * Creates a new UIProvider instance of this class. | 53 * Creates a new UIProvider instance of this class. |
51 */ | 54 */ |
52 public SelectProvider() { | 55 public SelectProvider() { |
88 * @param data The {@link Data} object. | 91 * @param data The {@link Data} object. |
89 * | 92 * |
90 * @return a combobox. | 93 * @return a combobox. |
91 */ | 94 */ |
92 public Canvas create(Data data) { | 95 public Canvas create(Data data) { |
96 dataName = data.getLabel(); | |
97 | |
93 VLayout v = new VLayout(); | 98 VLayout v = new VLayout(); |
94 | 99 |
95 Canvas content = createWidget(data); | 100 Canvas content = createWidget(data); |
96 | 101 |
97 IButton button = new IButton(messages.next(), this); | 102 IButton button = new IButton(messages.next(), this); |
112 */ | 117 */ |
113 protected Canvas createWidget(Data data) { | 118 protected Canvas createWidget(Data data) { |
114 GWT.log("SelectProvider - create()"); | 119 GWT.log("SelectProvider - create()"); |
115 | 120 |
116 HLayout layout = new HLayout(); | 121 HLayout layout = new HLayout(); |
117 Label label = new Label(data.getLabel()); | 122 Label label = new Label(data.getDescription()); |
118 DynamicForm form = new DynamicForm(); | 123 DynamicForm form = new DynamicForm(); |
119 combobox = new ComboBoxItem(data.getLabel()); | 124 combobox = new ComboBoxItem(data.getLabel()); |
120 | 125 |
121 LinkedHashMap<String, String> it = new LinkedHashMap<String, String>(); | 126 LinkedHashMap<String, String> it = new LinkedHashMap<String, String>(); |
122 | 127 |
139 } | 144 } |
140 | 145 |
141 | 146 |
142 protected Data[] getData() { | 147 protected Data[] getData() { |
143 String selection = combobox.getValueAsString(); | 148 String selection = combobox.getValueAsString(); |
144 DataItem item = new DefaultDataItem("river", null, selection); | 149 DataItem item = new DefaultDataItem(dataName, null, selection); |
145 | 150 |
146 return new Data[] { new DefaultData( | 151 return new Data[] { new DefaultData( |
147 "river", null, null, new DataItem[] { item }, null) }; | 152 dataName, null, null, new DataItem[] { item }, null) }; |
148 } | 153 } |
149 } | 154 } |
150 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 155 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |