Mercurial > dive4elements > river
comparison flys-client/src/main/java/org/dive4elements/river/client/client/ui/MapSelection.java @ 5834:f507086aa94b
Repaired internal references.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 25 Apr 2013 12:31:32 +0200 |
parents | flys-client/src/main/java/de/intevation/flys/client/client/ui/MapSelection.java@b87073a05f9d |
children | 821a02bbfb4e |
comparison
equal
deleted
inserted
replaced
5833:a2bdc0f524e8 | 5834:f507086aa94b |
---|---|
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.layout.HLayout; | |
8 | |
9 import de.intevation.flys.client.shared.model.Data; | |
10 import de.intevation.flys.client.shared.model.DataList; | |
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 private static final long serialVersionUID = 1261822454641198692L; | |
23 | |
24 protected ModuleSelection moduleSelection; | |
25 | |
26 public MapSelection() { | |
27 } | |
28 | |
29 | |
30 /** | |
31 * This method currently returns a | |
32 * {@link com.smartgwt.client.widgets.form.DynamicForm} that contains all | |
33 * data items in a combobox stored in <i>data</i>.<br> | |
34 * | |
35 * <b>TODO: The map panel for the river selection needs to be | |
36 * implemented!</b> | |
37 * | |
38 * @param data The {@link DataList} object. | |
39 * | |
40 * @return a combobox. | |
41 */ | |
42 @Override | |
43 protected Canvas createWidget(DataList data) { | |
44 GWT.log("MapSelection - create()"); | |
45 | |
46 HLayout h = new HLayout(); | |
47 h.setAlign(VerticalAlignment.TOP); | |
48 h.setHeight(100); | |
49 moduleSelection = new ModuleSelection(); | |
50 | |
51 Canvas form = moduleSelection.create(data); | |
52 form.setWidth(400); | |
53 form.setLayoutAlign(VerticalAlignment.TOP); | |
54 | |
55 // TODO implement event handling in the river map (here? or in LinkSelection) | |
56 | |
57 h.addMember(form); | |
58 | |
59 return h; | |
60 } | |
61 | |
62 @Override | |
63 protected Data[] getData() { | |
64 if (moduleSelection != null) { | |
65 return moduleSelection.getData(); | |
66 } | |
67 else { | |
68 return null; | |
69 } | |
70 } | |
71 } | |
72 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |