annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/map/CapabilitiesPanel.java @ 1409:ec6e4dad1279

Read and display all FLYS relevant information of Capabilities documents. flys-client/trunk@3296 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 21 Nov 2011 18:15:44 +0000
parents 5b5a20e4c4e5
children 3f15d9c22d53
rev   line source
1408
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.client.client.ui.map;
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
1409
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
3 import com.google.gwt.core.client.GWT;
1408
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4 import com.google.gwt.user.client.ui.Grid;
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5
1409
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
6 import com.smartgwt.client.types.Overflow;
1408
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7 import com.smartgwt.client.widgets.Label;
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8 import com.smartgwt.client.widgets.layout.HLayout;
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9 import com.smartgwt.client.widgets.layout.Layout;
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10 import com.smartgwt.client.widgets.layout.VLayout;
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12 import de.intevation.flys.client.shared.model.Capabilities;
1409
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
13 import de.intevation.flys.client.shared.model.ContactInformation;
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
14 import de.intevation.flys.client.client.FLYSConstants;
1408
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17 public class CapabilitiesPanel extends VLayout {
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18
1409
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
19 protected FLYSConstants MSG = GWT.create(FLYSConstants.class);
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
20
1408
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21 protected Capabilities capabilites;
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24 public CapabilitiesPanel(Capabilities capabilites) {
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25 super();
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26 this.capabilites = capabilites;
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28 initLayout();
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29 }
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32 protected void initLayout() {
1409
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
33 setMargin(5);
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
34 setOverflow(Overflow.AUTO);
1408
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35 initContent();
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36 }
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39 protected void initContent() {
1409
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
40 Grid grid = new Grid(10, 2);
1408
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41 grid.setCellPadding(10);
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
42
1409
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
43 grid.setText(0, 0, MSG.capabilitiesTitle() + ":");
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
44 grid.setText(0, 1, capabilites.getTitle());
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
45 grid.setText(1, 0, MSG.capabilitiesURL() + ":");
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
46 grid.setText(1, 1, capabilites.getOnlineResource());
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
47 grid.setText(2, 0, MSG.capabilitiesAccessConstraints() + ":");
1408
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48 grid.setText(2, 1, capabilites.getAccessConstraints());
1409
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
49 grid.setText(3, 0, MSG.capabilitiesFees() + ":");
1408
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
50 grid.setText(3, 1, capabilites.getFees());
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
51
1409
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
52 ContactInformation ci = capabilites.getContactInformation();
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
53 grid.setText(4, 0, MSG.capabilitiesContactInformation() + ":");
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
54 grid.setText(4, 1, ci.getPerson());
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
55 grid.setText(5, 0, "");
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
56 grid.setText(5, 1, ci.getOrganization());
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
57 grid.setText(6, 0, "");
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
58 grid.setText(6, 1, ci.getAddress());
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
59 grid.setText(7, 0, "");
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
60 grid.setText(7, 1, ci.getPostcode() + " " + ci.getCity());
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
61 grid.setText(8, 0, "");
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
62 grid.setText(8, 1, MSG.capabilitiesEmail() + ": " + ci.getEmail());
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
63 grid.setText(9, 0, "");
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
64 grid.setText(9, 1, MSG.capabilitiesPhone() + ": " + ci.getPhone());
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
65
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
66 Label title = new Label(MSG.capabilitiesHint());
1408
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
67 title.setHeight(25);
1409
ec6e4dad1279 Read and display all FLYS relevant information of Capabilities documents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1408
diff changeset
68 title.setStyleName("capabilities-info-title");
1408
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
69
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
70 addMember(title);
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
71 addMember(grid);
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
72 }
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
73
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
74
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
75 protected Layout createRow(Label title, Label content) {
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
76 title.setWidth(100);
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
77
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
78 HLayout layout = new HLayout();
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
79 layout.addMember(title);
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
80 layout.addMember(content);
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
81
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
82 return layout;
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
83 }
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
84 }
5b5a20e4c4e5 Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
85 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org