comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/AbstractUIProvider.java @ 247:4a684d29404f

Implemented the createOld() of WQAdaptedInputPanel. flys-client/trunk@1832 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 05 May 2011 09:33:15 +0000
parents 137daff2c732
children 9f16ac843dda
comparison
equal deleted inserted replaced
246:ccba1a0b743e 247:4a684d29404f
17 import de.intevation.flys.client.client.event.StepBackEvent; 17 import de.intevation.flys.client.client.event.StepBackEvent;
18 import de.intevation.flys.client.client.event.StepBackHandler; 18 import de.intevation.flys.client.client.event.StepBackHandler;
19 import de.intevation.flys.client.client.event.StepForwardEvent; 19 import de.intevation.flys.client.client.event.StepForwardEvent;
20 import de.intevation.flys.client.client.event.StepForwardHandler; 20 import de.intevation.flys.client.client.event.StepForwardHandler;
21 import de.intevation.flys.client.shared.model.Data; 21 import de.intevation.flys.client.shared.model.Data;
22 import de.intevation.flys.client.shared.model.DataItem;
22 import de.intevation.flys.client.shared.model.DataList; 23 import de.intevation.flys.client.shared.model.DataList;
23 import de.intevation.flys.client.shared.model.Artifact; 24 import de.intevation.flys.client.shared.model.Artifact;
24 25
25 /** 26 /**
26 * An abstract UIProvider that provides some basic methods. 27 * An abstract UIProvider that provides some basic methods.
175 this.artifact = art; 176 this.artifact = art;
176 } 177 }
177 178
178 179
179 /** 180 /**
181 * This method greps the Data with name <i>name</i> from the list and
182 * returns it.
183 *
184 * @param items A list of Data.
185 * @param name The name of the Data that we are searching for.
186 *
187 * @return the Data with the name <i>name</i>.
188 */
189 protected Data getData(List<Data> data, String name) {
190 for (Data d: data) {
191 if (name.equals(d.getLabel())) {
192 return d;
193 }
194 }
195
196 return null;
197 }
198
199 /**
200 * This method greps the DataItem with name <i>name</i> from the list and
201 * returns it.
202 *
203 * @param items A list of DataItems.
204 * @param name The name of the DataItem that we are searching for.
205 *
206 * @return the DataItem with the name <i>name</i>.
207 */
208 protected DataItem getDataItem(DataItem[] items, String name) {
209 for (DataItem item: items) {
210 if (name.equals(item.getLabel())) {
211 return item;
212 }
213 }
214
215 return null;
216 }
217
218
219 /**
180 * This method needs to be implemented by concrete subclasses. It should 220 * This method needs to be implemented by concrete subclasses. It should
181 * create a new Canvas object with a representation of <i>data</i>. 221 * create a new Canvas object with a representation of <i>data</i>.
182 * 222 *
183 * @param data The data that should be displayed. 223 * @param data The data that should be displayed.
184 * 224 *

http://dive4elements.wald.intevation.org