svn-gvsig-desktop / branches / v10 / extensions / extPublish / src / org / gvsig / publish / gui / ogcMetadata / OGCWMSPanel.java @ 19900
History | View | Annotate | Download (4.69 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2004-2006 IVER T.I. and Generalitat Valenciana.
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU General Public License
|
7 |
* as published by the Free Software Foundation; either version 2
|
8 |
* of the License, or (at your option) any later version.
|
9 |
*
|
10 |
* This program is distributed in the hope that it will be useful,
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
* GNU General Public License for more details.
|
14 |
*
|
15 |
* You should have received a copy of the GNU General Public License
|
16 |
* along with this program; if not, write to the Free Software
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
18 |
*
|
19 |
* For more information, contact:
|
20 |
*
|
21 |
* Generalitat Valenciana
|
22 |
* Conselleria d'Infraestructures i Transport
|
23 |
* Av. Blasco Iba?ez, 50
|
24 |
* 46010 VALENCIA
|
25 |
* SPAIN
|
26 |
*
|
27 |
* +34 963862235
|
28 |
* gvsig@gva.es
|
29 |
* www.gvsig.gva.es
|
30 |
*
|
31 |
* or
|
32 |
*
|
33 |
* IVER T.I. S.A
|
34 |
* Salamanca 50
|
35 |
* 46005 Valencia
|
36 |
* Spain
|
37 |
*
|
38 |
* +34 963163400
|
39 |
* dac@iver.es
|
40 |
*/
|
41 |
package org.gvsig.publish.gui.ogcMetadata; |
42 |
|
43 |
import java.util.EventListener; |
44 |
|
45 |
import javax.swing.JPanel; |
46 |
|
47 |
import org.gvsig.publish.PublishLogger; |
48 |
import org.gvsig.publish.gui.publish.IPublishPluginPanel; |
49 |
import org.gvsig.publish.ogcmetadata.IOGCServiceMetadata; |
50 |
|
51 |
public class OGCWMSPanel extends JPanel implements IPublishPluginPanel { |
52 |
//model
|
53 |
private IOGCServiceMetadata model;
|
54 |
/**
|
55 |
* constructor
|
56 |
*/
|
57 |
public OGCWMSPanel() {
|
58 |
super();
|
59 |
initComponents(); |
60 |
initLabels(); |
61 |
initIcons(); |
62 |
} |
63 |
|
64 |
private void initIcons() { |
65 |
//wms logo
|
66 |
try {
|
67 |
icon.setIcon(new javax.swing.ImageIcon(getClass().getClassLoader().getResource("images/publish-wms111.gif"))); |
68 |
}catch( java.lang.NullPointerException e){
|
69 |
PublishLogger.getLog().error("ERROR " + getClass().getName() + ":Error loading icons", e); |
70 |
} |
71 |
} |
72 |
|
73 |
private void initLabels() { |
74 |
// TODO Auto-generated method stub
|
75 |
|
76 |
} |
77 |
|
78 |
private void initComponents() { |
79 |
java.awt.GridBagConstraints gridBagConstraints; |
80 |
|
81 |
icon = new javax.swing.JLabel();
|
82 |
jSeparator1 = new javax.swing.JSeparator();
|
83 |
commonPanel = new org.gvsig.publish.gui.ogcMetadata.OGCCommonMetadataPanel();
|
84 |
servicePanel = new org.gvsig.publish.gui.ogcMetadata.OGCServiceMetadataPanel();
|
85 |
|
86 |
setLayout(new java.awt.GridBagLayout());
|
87 |
gridBagConstraints = new java.awt.GridBagConstraints();
|
88 |
gridBagConstraints.gridx = 0;
|
89 |
gridBagConstraints.gridy = 0;
|
90 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; |
91 |
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); |
92 |
add(icon, gridBagConstraints); |
93 |
gridBagConstraints = new java.awt.GridBagConstraints();
|
94 |
gridBagConstraints.gridx = 0;
|
95 |
gridBagConstraints.gridy = 1;
|
96 |
gridBagConstraints.gridwidth = 2;
|
97 |
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; |
98 |
gridBagConstraints.weightx = 1.0;
|
99 |
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); |
100 |
add(jSeparator1, gridBagConstraints); |
101 |
gridBagConstraints = new java.awt.GridBagConstraints();
|
102 |
gridBagConstraints.gridx = 1;
|
103 |
gridBagConstraints.gridy = 2;
|
104 |
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; |
105 |
gridBagConstraints.weightx = 1.0;
|
106 |
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); |
107 |
add(commonPanel, gridBagConstraints); |
108 |
gridBagConstraints = new java.awt.GridBagConstraints();
|
109 |
gridBagConstraints.gridx = 0;
|
110 |
gridBagConstraints.gridy = 3;
|
111 |
gridBagConstraints.gridwidth = 2;
|
112 |
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; |
113 |
gridBagConstraints.weightx = 1.0;
|
114 |
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); |
115 |
add(servicePanel, gridBagConstraints); |
116 |
}// </editor-fold>
|
117 |
|
118 |
|
119 |
// Variables declaration - do not modify
|
120 |
private org.gvsig.publish.gui.ogcMetadata.OGCCommonMetadataPanel commonPanel;
|
121 |
private javax.swing.JLabel icon;
|
122 |
private javax.swing.JSeparator jSeparator1;
|
123 |
private org.gvsig.publish.gui.ogcMetadata.OGCServiceMetadataPanel servicePanel;
|
124 |
// End of variables declaration
|
125 |
|
126 |
public Object getModel() { |
127 |
commonPanel.getModel(); |
128 |
servicePanel.getModel(); |
129 |
return model;
|
130 |
} |
131 |
|
132 |
public void setListener(EventListener listener) { |
133 |
commonPanel.setListener(listener); |
134 |
servicePanel.setListener(listener); |
135 |
} |
136 |
|
137 |
public void setModel(Object entityModel) { |
138 |
//cast
|
139 |
model = (IOGCServiceMetadata)entityModel; |
140 |
commonPanel.setModel(model); |
141 |
servicePanel.setModel(model); |
142 |
} |
143 |
|
144 |
} |