svn-gvsig-desktop / branches / v10 / extensions / extPublishMapserver / src / org / gvsig / publish / mapserver / gui / wms / MSWMSLayerAdvancedPanel.java @ 22616
History | View | Annotate | Download (4.29 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.mapserver.gui.wms; |
42 |
|
43 |
import java.util.EventListener; |
44 |
|
45 |
import javax.swing.JPanel; |
46 |
|
47 |
import org.gvsig.publish.gui.publish.IPublishPluginPanel; |
48 |
import org.gvsig.publish.infoproject.IDataSourceInfo; |
49 |
import org.gvsig.publish.mapserver.model.wms.MapserverWMSLayer; |
50 |
|
51 |
public class MSWMSLayerAdvancedPanel extends JPanel implements IPublishPluginPanel { |
52 |
//model
|
53 |
private MapserverWMSLayer model=null; |
54 |
/**
|
55 |
* constructor
|
56 |
*/
|
57 |
public MSWMSLayerAdvancedPanel() {
|
58 |
super();
|
59 |
initComponents(); |
60 |
initLabels(); |
61 |
} |
62 |
private void initLabels() { |
63 |
//
|
64 |
|
65 |
} |
66 |
private void initComponents() { |
67 |
java.awt.GridBagConstraints gridBagConstraints; |
68 |
|
69 |
jSeparator1 = new javax.swing.JSeparator();
|
70 |
ogcpanel = new org.gvsig.publish.gui.ogcMetadata.OGCLayerMetadataPanel();
|
71 |
mapserverpanel = new org.gvsig.publish.mapserver.gui.common.MapserverLayerPanel();
|
72 |
|
73 |
setLayout(new java.awt.GridBagLayout());
|
74 |
gridBagConstraints = new java.awt.GridBagConstraints();
|
75 |
gridBagConstraints.gridx = 0;
|
76 |
gridBagConstraints.gridy = 1;
|
77 |
gridBagConstraints.gridwidth = 3;
|
78 |
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; |
79 |
gridBagConstraints.weightx = 1.0;
|
80 |
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); |
81 |
add(jSeparator1, gridBagConstraints); |
82 |
gridBagConstraints = new java.awt.GridBagConstraints();
|
83 |
gridBagConstraints.gridx = 0;
|
84 |
gridBagConstraints.gridy = 2;
|
85 |
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; |
86 |
gridBagConstraints.weightx = 1.0;
|
87 |
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); |
88 |
add(ogcpanel, gridBagConstraints); |
89 |
gridBagConstraints = new java.awt.GridBagConstraints();
|
90 |
gridBagConstraints.gridx = 0;
|
91 |
gridBagConstraints.gridy = 3;
|
92 |
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; |
93 |
gridBagConstraints.weightx = 1.0;
|
94 |
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); |
95 |
add(mapserverpanel, gridBagConstraints); |
96 |
}// </editor-fold>
|
97 |
|
98 |
|
99 |
// Variables declaration - do not modify
|
100 |
private javax.swing.JSeparator jSeparator1;
|
101 |
private org.gvsig.publish.mapserver.gui.common.MapserverLayerPanel mapserverpanel;
|
102 |
private org.gvsig.publish.gui.ogcMetadata.OGCLayerMetadataPanel ogcpanel;
|
103 |
// End of variables declaration
|
104 |
|
105 |
/*
|
106 |
* (non-Javadoc)
|
107 |
* @see org.gvsig.publish.gui.publish.IPublishPluginPanel#getModel()
|
108 |
*/
|
109 |
public Object getModel() { |
110 |
mapserverpanel.getModel(); |
111 |
ogcpanel.getModel(); |
112 |
return model;
|
113 |
} |
114 |
/*
|
115 |
* (non-Javadoc)
|
116 |
* @see org.gvsig.publish.gui.publish.IPublishPluginPanel#setListener(java.util.EventListener)
|
117 |
*/
|
118 |
public void setListener(EventListener listener) { |
119 |
mapserverpanel.setListener(listener); |
120 |
ogcpanel.setListener(listener); |
121 |
} |
122 |
/*
|
123 |
* (non-Javadoc)
|
124 |
* @see org.gvsig.publish.gui.publish.IPublishPluginPanel#setModel(java.lang.Object)
|
125 |
*/
|
126 |
public void setModel(Object entityModel) { |
127 |
// cast
|
128 |
model = (MapserverWMSLayer)entityModel; |
129 |
|
130 |
if (model.getLayerInfo().getDataSource().getType() == IDataSourceInfo.SHAPE_TYPE ){
|
131 |
mapserverpanel.enableMosaicCheckbox(true);
|
132 |
}else{
|
133 |
mapserverpanel.enableMosaicCheckbox(false);
|
134 |
} |
135 |
|
136 |
mapserverpanel.setModel(model.getSpecificParams()); |
137 |
ogcpanel.setModel(model); |
138 |
} |
139 |
|
140 |
} |