Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/map/CapabilitiesPanel.java @ 1408:5b5a20e4c4e5
Added a service that loads the Capabilities of a specified WMS - display those information in the ExternalWMSWindow.
flys-client/trunk@3295 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 21 Nov 2011 12:00:48 +0000 |
parents | |
children | ec6e4dad1279 |
comparison
equal
deleted
inserted
replaced
1407:ee2875510c12 | 1408:5b5a20e4c4e5 |
---|---|
1 package de.intevation.flys.client.client.ui.map; | |
2 | |
3 import com.google.gwt.user.client.ui.Grid; | |
4 | |
5 import com.smartgwt.client.widgets.Label; | |
6 import com.smartgwt.client.widgets.layout.HLayout; | |
7 import com.smartgwt.client.widgets.layout.Layout; | |
8 import com.smartgwt.client.widgets.layout.VLayout; | |
9 | |
10 import de.intevation.flys.client.shared.model.Capabilities; | |
11 | |
12 | |
13 public class CapabilitiesPanel extends VLayout { | |
14 | |
15 protected Capabilities capabilites; | |
16 | |
17 | |
18 public CapabilitiesPanel(Capabilities capabilites) { | |
19 super(); | |
20 this.capabilites = capabilites; | |
21 | |
22 initLayout(); | |
23 } | |
24 | |
25 | |
26 protected void initLayout() { | |
27 setMargin(10); | |
28 initContent(); | |
29 } | |
30 | |
31 | |
32 protected void initContent() { | |
33 Grid grid = new Grid(5, 2); | |
34 grid.setCellPadding(10); | |
35 | |
36 grid.setText(0, 0, "Titel:"); | |
37 grid.setText(0, 1, "TODO:"); | |
38 grid.setText(1, 0, "URL:"); | |
39 grid.setText(1, 1, "TODO"); | |
40 grid.setText(2, 0, "Nutzungsbedingungen:"); | |
41 grid.setText(2, 1, capabilites.getAccessConstraints()); | |
42 grid.setText(3, 0, "Gebühren:"); | |
43 grid.setText(3, 1, capabilites.getFees()); | |
44 grid.setText(4, 0, "Weitere Informationen:"); | |
45 grid.setText(4, 1, "TODO"); | |
46 | |
47 Label title = new Label("Bitte beachten Sie folgende Informationen des WMS-Dienstes:"); | |
48 title.setHeight(25); | |
49 | |
50 addMember(title); | |
51 addMember(grid); | |
52 } | |
53 | |
54 | |
55 //private void initLayout() { | |
56 // Label title = new Label("Titel:"); | |
57 // Label url = new Label("URL:"); | |
58 // Label access = new Label("Nutzungsbedingungen:"); | |
59 // Label fees = new Label("Gebühren:"); | |
60 // Label contact = new Label("Weitere Informationen:"); | |
61 | |
62 // Label titleContent = new Label("TODO"); | |
63 // Label urlContent = new Label("TODO"); | |
64 // Label accessContent = new Label(capabilites.getAccessConstraints()); | |
65 // Label feesContent = new Label(capabilites.getFees()); | |
66 // Label contactContent = new Label("TODO"); | |
67 | |
68 // addMember(createRow(title, titleContent)); | |
69 // addMember(createRow(url, urlContent)); | |
70 // addMember(createRow(access, accessContent)); | |
71 // addMember(createRow(fees, feesContent)); | |
72 // addMember(createRow(contact, contactContent)); | |
73 //} | |
74 | |
75 | |
76 protected Layout createRow(Label title, Label content) { | |
77 title.setWidth(100); | |
78 | |
79 HLayout layout = new HLayout(); | |
80 layout.addMember(title); | |
81 layout.addMember(content); | |
82 | |
83 return layout; | |
84 } | |
85 } | |
86 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |