Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/MapSelection.java @ 39:4187a797fc3d
Implemented the step forward mechanism in the CollectionView and added the river map to the initial widget.
flys-client/trunk@1472 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 15 Mar 2011 14:35:41 +0000 |
parents | 5709bd8f4d7c |
children | d573ae975330 |
comparison
equal
deleted
inserted
replaced
38:7142386e86c2 | 39:4187a797fc3d |
---|---|
1 package de.intevation.flys.client.client.ui; | 1 package de.intevation.flys.client.client.ui; |
2 | 2 |
3 import com.google.gwt.core.client.GWT; | 3 import com.google.gwt.core.client.GWT; |
4 import com.google.gwt.resources.client.ImageResource; | |
4 | 5 |
5 import com.smartgwt.client.types.VerticalAlignment; | 6 import com.smartgwt.client.types.VerticalAlignment; |
6 import com.smartgwt.client.widgets.Canvas; | 7 import com.smartgwt.client.widgets.Canvas; |
8 import com.smartgwt.client.widgets.Img; | |
7 import com.smartgwt.client.widgets.Label; | 9 import com.smartgwt.client.widgets.Label; |
8 import com.smartgwt.client.widgets.layout.HLayout; | 10 import com.smartgwt.client.widgets.layout.HLayout; |
9 | 11 |
10 import de.intevation.flys.client.shared.model.Data; | 12 import de.intevation.flys.client.shared.model.Data; |
13 import de.intevation.flys.client.client.FLYSImages; | |
11 | 14 |
12 | 15 |
13 /** | 16 /** |
14 * This UIProvider displays the DataItems contained in the Data object in a | 17 * 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 | 18 * 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. | 19 * lets the user choose a river by selecting it on the map. |
17 * | 20 * |
18 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 21 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
19 */ | 22 */ |
20 public class MapSelection extends SelectProvider { | 23 public class MapSelection extends SelectProvider { |
24 | |
25 /** The interface that provides the image resources. */ | |
26 private FLYSImages IMAGES = GWT.create(FLYSImages.class); | |
27 | |
21 | 28 |
22 public MapSelection() { | 29 public MapSelection() { |
23 } | 30 } |
24 | 31 |
25 | 32 |
42 h.setAlign(VerticalAlignment.TOP); | 49 h.setAlign(VerticalAlignment.TOP); |
43 | 50 |
44 Canvas form = super.createWidget(data); | 51 Canvas form = super.createWidget(data); |
45 form.setWidth(250); | 52 form.setWidth(250); |
46 | 53 |
47 Label label = new Label("TODO: Map with rivers."); | 54 ImageResource mapRes = IMAGES.riverMap(); |
48 label.setValign(VerticalAlignment.TOP); | 55 Img map = new Img(mapRes.getURL(), 400, 452); |
49 | 56 |
50 // TODO add the map panel to select the rivers via map. | 57 // TODO implement event handling in the river map |
51 | 58 |
52 h.addMember(form); | 59 h.addMember(form); |
53 h.addMember(label); | 60 h.addMember(map); |
54 | 61 |
55 return h; | 62 return h; |
56 } | 63 } |
57 } | 64 } |
58 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 65 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |