Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/map/GetFeatureInfoWindow.java @ 5818:a4ff4167be1e
Request feature info on all layers and show it as html if
the server does not return valid gml.
Non queryable layers produce an error message when the request
fails. This is good enough
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 24 Apr 2013 17:33:27 +0200 |
parents | e0ab5a566688 |
children | 79717f1cf6eb |
comparison
equal
deleted
inserted
replaced
5817:a1dd784d8b07 | 5818:a4ff4167be1e |
---|---|
1 package de.intevation.flys.client.client.ui.map; | 1 package de.intevation.flys.client.client.ui.map; |
2 | 2 |
3 import com.google.gwt.core.client.GWT; | 3 import com.google.gwt.core.client.GWT; |
4 | 4 |
5 import com.smartgwt.client.widgets.HTMLPane; | |
5 import com.smartgwt.client.widgets.Label; | 6 import com.smartgwt.client.widgets.Label; |
6 import com.smartgwt.client.widgets.Window; | 7 import com.smartgwt.client.widgets.Window; |
7 import com.smartgwt.client.widgets.layout.VLayout; | 8 import com.smartgwt.client.widgets.layout.VLayout; |
8 import com.smartgwt.client.widgets.viewer.DetailViewer; | 9 import com.smartgwt.client.widgets.viewer.DetailViewer; |
9 import com.smartgwt.client.widgets.viewer.DetailViewerField; | 10 import com.smartgwt.client.widgets.viewer.DetailViewerField; |
10 import com.smartgwt.client.widgets.viewer.DetailViewerRecord; | 11 import com.smartgwt.client.widgets.viewer.DetailViewerRecord; |
11 | 12 |
12 import de.intevation.flys.client.client.FLYSConstants; | 13 import de.intevation.flys.client.client.FLYSConstants; |
13 import de.intevation.flys.client.shared.model.FeatureInfo; | 14 import de.intevation.flys.client.shared.model.FeatureInfo; |
15 import de.intevation.flys.client.shared.model.FeatureInfoResponse; | |
14 | 16 |
15 import java.util.ArrayList; | 17 import java.util.ArrayList; |
16 import java.util.List; | 18 import java.util.List; |
17 import java.util.Map; | 19 import java.util.Map; |
18 import java.util.Set; | 20 import java.util.Set; |
29 | 31 |
30 protected List<FeatureInfo> features; | 32 protected List<FeatureInfo> features; |
31 | 33 |
32 protected String title; | 34 protected String title; |
33 | 35 |
36 protected String featureInfoHTML; | |
37 | |
34 | 38 |
35 public static final int ROW_HEIGHT = 25; | 39 public static final int ROW_HEIGHT = 25; |
36 | 40 |
37 | 41 |
38 public GetFeatureInfoWindow(List<FeatureInfo> features, String title) { | 42 public GetFeatureInfoWindow(List<FeatureInfo> features, String title) { |
41 this.title = title; | 45 this.title = title; |
42 | 46 |
43 initLayout(); | 47 initLayout(); |
44 } | 48 } |
45 | 49 |
50 public GetFeatureInfoWindow(String featureInfoHTML, String title) { | |
51 super(); | |
52 features = null; | |
53 this.title = title; | |
54 this.featureInfoHTML = featureInfoHTML; | |
55 | |
56 initLayoutHTML(); | |
57 } | |
58 | |
59 protected void initLayoutHTML() { | |
60 HTMLPane pane = new HTMLPane(); | |
61 pane.setContents(featureInfoHTML); | |
62 addItem(pane); | |
63 setWidth(500); | |
64 setHeight(300); | |
65 | |
66 setIsModal(false); | |
67 // setShowModalMask(true); | |
68 | |
69 centerInPage(); | |
70 } | |
46 | 71 |
47 protected void initLayout() { | 72 protected void initLayout() { |
48 VLayout root = new VLayout(); | 73 VLayout root = new VLayout(); |
49 | 74 |
50 for (FeatureInfo feature: features) { | 75 for (FeatureInfo feature: features) { |