comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/MapSelection.java @ 1399:748e7c828d03

Issue312. Moved images and get image urls from constants to completly support IE7. flys-client/trunk@3284 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 17 Nov 2011 14:10:51 +0000
parents dfbc6693247e
children 047a44270348
comparison
equal deleted inserted replaced
1398:3f6d2f18ee7b 1399:748e7c828d03
7 import com.smartgwt.client.widgets.Canvas; 7 import com.smartgwt.client.widgets.Canvas;
8 import com.smartgwt.client.widgets.Img; 8 import com.smartgwt.client.widgets.Img;
9 import com.smartgwt.client.widgets.layout.HLayout; 9 import com.smartgwt.client.widgets.layout.HLayout;
10 10
11 import de.intevation.flys.client.shared.model.DataList; 11 import de.intevation.flys.client.shared.model.DataList;
12 import de.intevation.flys.client.client.FLYSImages; 12 import de.intevation.flys.client.client.FLYSConstants;
13 import de.intevation.flys.client.shared.model.Data; 13 import de.intevation.flys.client.shared.model.Data;
14 14
15 15
16 /** 16 /**
17 * 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
21 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> 21 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
22 */ 22 */
23 public class MapSelection extends SelectProvider { 23 public class MapSelection extends SelectProvider {
24 24
25 /** The interface that provides the image resources. */ 25 /** The interface that provides the image resources. */
26 private FLYSImages IMAGES = GWT.create(FLYSImages.class); 26 private FLYSConstants MESSAGES = GWT.create(FLYSConstants.class);
27 27
28 protected ModuleSelection moduleSelection; 28 protected ModuleSelection moduleSelection;
29 29
30 public MapSelection() { 30 public MapSelection() {
31 } 31 }
44 * @return a combobox. 44 * @return a combobox.
45 */ 45 */
46 protected Canvas createWidget(DataList data) { 46 protected Canvas createWidget(DataList data) {
47 GWT.log("MapSelection - create()"); 47 GWT.log("MapSelection - create()");
48 48
49 String baseUrl = GWT.getHostPageBaseURL();
50
49 HLayout h = new HLayout(); 51 HLayout h = new HLayout();
50 h.setAlign(VerticalAlignment.TOP); 52 h.setAlign(VerticalAlignment.TOP);
51 h.setHeight(100); 53 h.setHeight(100);
52 moduleSelection = new ModuleSelection(); 54 moduleSelection = new ModuleSelection();
53 55
54 Canvas form = moduleSelection.create(data); 56 Canvas form = moduleSelection.create(data);
55 form.setWidth(250); 57 form.setWidth(250);
56 form.setLayoutAlign(VerticalAlignment.TOP); 58 form.setLayoutAlign(VerticalAlignment.TOP);
57 59
58 ImageResource mapRes = IMAGES.riverMap(); 60 Img map = new Img(baseUrl + MESSAGES.riverMap(), 400, 452);
59 Img map = new Img(mapRes.getURL(), 400, 452);
60 61
61 // TODO implement event handling in the river map 62 // TODO implement event handling in the river map
62 63
63 h.addMember(form); 64 h.addMember(form);
64 helperContainer.addMember(map); 65 helperContainer.addMember(map);

http://dive4elements.wald.intevation.org