comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/MapSelection.java @ 20:c128d675386b

Added UIProviders that are used to create widgets for entering data. flys-client/trunk@1334 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 22 Feb 2011 17:17:12 +0000
parents
children 5709bd8f4d7c
comparison
equal deleted inserted replaced
19:f48b2cb2e219 20:c128d675386b
1 package de.intevation.flys.client.client.ui;
2
3 import com.google.gwt.core.client.GWT;
4
5 import com.smartgwt.client.types.VerticalAlignment;
6 import com.smartgwt.client.widgets.Canvas;
7 import com.smartgwt.client.widgets.Label;
8 import com.smartgwt.client.widgets.layout.HLayout;
9
10 import de.intevation.flys.client.shared.model.Data;
11
12
13 /**
14 * This UIProvider displays the DataItems contained in the Data object in a
15 * combo box as SelectProvider does. Furthermore, there is a map displayed that
16 * lets the user choose a river by selecting it on the map.
17 *
18 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
19 */
20 public class MapSelection extends SelectProvider {
21
22 public MapSelection() {
23 }
24
25
26 /**
27 * This method currently returns a
28 * {@link com.smartgwt.client.widgets.form.DynamicForm} that contains all
29 * data items in a combobox stored in <i>data</i>.<br>
30 *
31 * <b>TODO: The map panel for the river selection needs to be
32 * implemented!</b>
33 *
34 * @param data The {@link Data} object.
35 *
36 * @return a combobox.
37 */
38 protected Canvas createWidget(Data data) {
39 GWT.log("MapSelection - create()");
40
41 HLayout h = new HLayout();
42 h.setAlign(VerticalAlignment.TOP);
43
44 Canvas form = super.createWidget(data);
45
46 Label label = new Label("TODO: Map with rivers.");
47 label.setValign(VerticalAlignment.TOP);
48
49 // TODO add the map panel to select the rivers via map.
50
51 h.addMember(form);
52 h.addMember(label);
53
54 return h;
55 }
56 }
57 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org