root / trunk / extensions / extWFS2 / src / com / iver / cit / gvsig / wfs / WFSClientExtension.java @ 17740
History | View | Annotate | Download (7.91 KB)
1 | 4886 | jorpiell | package com.iver.cit.gvsig.wfs; |
---|---|---|---|
2 | |||
3 | 14818 | jmvivo | import com.iver.andami.PluginServices; |
4 | 4886 | jorpiell | import com.iver.andami.plugins.Extension; |
5 | import com.iver.cit.gvsig.AddLayer; |
||
6 | 7045 | jorpiell | import com.iver.cit.gvsig.fmap.layers.FLyrWFS; |
7 | 17593 | jpiera | import com.iver.cit.gvsig.gui.panels.WFSAreaPanel; |
8 | import com.iver.cit.gvsig.gui.panels.WFSFilterPanel; |
||
9 | import com.iver.cit.gvsig.gui.panels.WFSInfoPanel; |
||
10 | import com.iver.cit.gvsig.gui.panels.WFSOptionsPanel; |
||
11 | import com.iver.cit.gvsig.gui.panels.WFSSelectFeaturePanel; |
||
12 | import com.iver.cit.gvsig.gui.panels.WFSSelectFieldsPanel; |
||
13 | 17740 | ppiqueras | import com.iver.cit.gvsig.gui.toc.WFSPropertiesTocMenuEntry; |
14 | 6200 | jorpiell | import com.iver.cit.gvsig.gui.toc.WFSVectorialPropsTocMenuEntry; |
15 | 4886 | jorpiell | import com.iver.cit.gvsig.gui.wizards.WFSWizard; |
16 | 16688 | vcaballero | import com.iver.cit.gvsig.project.documents.view.legend.gui.General; |
17 | import com.iver.cit.gvsig.project.documents.view.legend.gui.LabelingManager; |
||
18 | import com.iver.cit.gvsig.project.documents.view.legend.gui.LegendManager; |
||
19 | import com.iver.cit.gvsig.project.documents.view.legend.gui.ThemeManagerWindow; |
||
20 | 7045 | jorpiell | import com.iver.utiles.extensionPoints.ExtensionPoints; |
21 | import com.iver.utiles.extensionPoints.ExtensionPointsSingleton; |
||
22 | 4886 | jorpiell | |
23 | /* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
||
24 | *
|
||
25 | * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
||
26 | *
|
||
27 | * This program is free software; you can redistribute it and/or
|
||
28 | * modify it under the terms of the GNU General Public License
|
||
29 | * as published by the Free Software Foundation; either version 2
|
||
30 | * of the License, or (at your option) any later version.
|
||
31 | *
|
||
32 | * This program is distributed in the hope that it will be useful,
|
||
33 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
34 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
35 | * GNU General Public License for more details.
|
||
36 | *
|
||
37 | * You should have received a copy of the GNU General Public License
|
||
38 | * along with this program; if not, write to the Free Software
|
||
39 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
||
40 | *
|
||
41 | * For more information, contact:
|
||
42 | *
|
||
43 | * Generalitat Valenciana
|
||
44 | * Conselleria d'Infraestructures i Transport
|
||
45 | * Av. Blasco Ib??ez, 50
|
||
46 | * 46010 VALENCIA
|
||
47 | * SPAIN
|
||
48 | *
|
||
49 | * +34 963862235
|
||
50 | * gvsig@gva.es
|
||
51 | * www.gvsig.gva.es
|
||
52 | *
|
||
53 | * or
|
||
54 | *
|
||
55 | * IVER T.I. S.A
|
||
56 | * Salamanca 50
|
||
57 | * 46005 Valencia
|
||
58 | * Spain
|
||
59 | *
|
||
60 | * +34 963163400
|
||
61 | * dac@iver.es
|
||
62 | */
|
||
63 | /* CVS MESSAGES:
|
||
64 | *
|
||
65 | * $Id$
|
||
66 | 14818 | jmvivo | * $Log: WFSClientExtension.java,v $
|
67 | * Revision 1.9 2007/09/04 10:53:52 caballero
|
||
68 | 13513 | caballero | * show page
|
69 | *
|
||
70 | * Revision 1.8 2006/10/02 09:09:45 jorpiell
|
||
71 | 7721 | jorpiell | * Cambios del 10 copiados al head
|
72 | 7304 | caballero | *
|
73 | * Revision 1.6 2006/09/05 15:41:52 jorpiell
|
||
74 | 7045 | jorpiell | * A?adida la funcionalidad de cargar WFS desde el cat?logo
|
75 | *
|
||
76 | * Revision 1.5 2006/07/05 12:04:50 jorpiell
|
||
77 | 6200 | jorpiell | * A?adida la opci?n de propiedades vectoriales
|
78 | *
|
||
79 | * Revision 1.4 2006/06/21 12:35:45 jorpiell
|
||
80 | 5948 | jorpiell | * Se ha a?adido la ventana de propiedades. Esto implica a?adir listeners por todos los paneles. Adem?s no se muestra la geomatr?a en la lista de atributos y se muestran ?nicamnete los que se van a descargar
|
81 | *
|
||
82 | * Revision 1.3 2006/05/19 12:57:34 jorpiell
|
||
83 | 5298 | jorpiell | * Ahora hereda de Extension
|
84 | 5005 | jorpiell | *
|
85 | * Revision 1.1 2006/04/19 12:50:16 jorpiell
|
||
86 | 4886 | jorpiell | * Primer commit de la aplicaci?n. Se puede hacer un getCapabilities y ver el mensaje de vienvenida del servidor
|
87 | *
|
||
88 | *
|
||
89 | */
|
||
90 | 17740 | ppiqueras | |
91 | 4886 | jorpiell | /**
|
92 | 17740 | ppiqueras | * <p>Adds the WFS extension to the gvSIG project.</p>
|
93 | *
|
||
94 | 4886 | jorpiell | * @author Jorge Piera Llodr? (piera_jor@gva.es)
|
95 | */
|
||
96 | 17740 | ppiqueras | public class WFSClientExtension extends Extension { |
97 | /*
|
||
98 | * (non-Javadoc)
|
||
99 | * @see com.iver.andami.plugins.IExtension#initialize()
|
||
100 | */
|
||
101 | 5005 | jorpiell | public void initialize() { |
102 | 17593 | jpiera | System.out.println("A?ado Wizard WFS2."); |
103 | |||
104 | 4886 | jorpiell | // Adds a new tab to the "add layer" wizard for WFS layer creation
|
105 | AddLayer.addWizard(WFSWizard.class); |
||
106 | 7045 | jorpiell | ExtensionPoints extensionPoints = ExtensionPointsSingleton.getInstance(); |
107 | 17593 | jpiera | //Extension to load a layer from a catalog
|
108 | extensionPoints.add("CatalogLayers","OGC:WFS",FLyrWFS.class); |
||
109 | //WFS properties panel
|
||
110 | 17740 | ppiqueras | extensionPoints.add("View_TocActions", "WFSProperties", new WFSPropertiesTocMenuEntry()); |
111 | 17593 | jpiera | extensionPoints.add("View_TocActions", "VectorialProperties", new WFSVectorialPropsTocMenuEntry()); |
112 | //WFS properties tabs:
|
||
113 | extensionPoints.add("WFSPropertiesDialog", "info", WFSInfoPanel.class); |
||
114 | extensionPoints.add("WFSPropertiesDialog", "features", WFSSelectFeaturePanel.class); |
||
115 | extensionPoints.add("WFSPropertiesDialog", "fields", WFSSelectFieldsPanel.class); |
||
116 | extensionPoints.add("WFSPropertiesDialog", "options", WFSOptionsPanel.class); |
||
117 | extensionPoints.add("WFSPropertiesDialog", "filter", WFSFilterPanel.class); |
||
118 | extensionPoints.add("WFSPropertiesDialog", "area", WFSAreaPanel.class); |
||
119 | 16688 | vcaballero | |
120 | ThemeManagerWindow.setTabEnabledForLayer(General.class, FLyrWFS.class, true);
|
||
121 | ThemeManagerWindow.setTabEnabledForLayer(LegendManager.class, FLyrWFS.class, true);
|
||
122 | ThemeManagerWindow.setTabEnabledForLayer(LabelingManager.class, FLyrWFS.class, true);
|
||
123 | |||
124 | 14818 | jmvivo | initilizeIcons(); |
125 | 4886 | jorpiell | } |
126 | |||
127 | 17740 | ppiqueras | /*
|
128 | * (non-Javadoc)
|
||
129 | * @see com.iver.andami.plugins.IExtension#execute(java.lang.String)
|
||
130 | */
|
||
131 | 4886 | jorpiell | public void execute(String actionCommand) { |
132 | // TODO Auto-generated method stub
|
||
133 | 13513 | caballero | |
134 | 4886 | jorpiell | } |
135 | |||
136 | 17740 | ppiqueras | /*
|
137 | * (non-Javadoc)
|
||
138 | * @see com.iver.andami.plugins.IExtension#isEnabled()
|
||
139 | */
|
||
140 | 4886 | jorpiell | public boolean isEnabled() { |
141 | // TODO Auto-generated method stub
|
||
142 | return false; |
||
143 | } |
||
144 | |||
145 | 17740 | ppiqueras | /*
|
146 | * (non-Javadoc)
|
||
147 | * @see com.iver.andami.plugins.IExtension#isVisible()
|
||
148 | */
|
||
149 | 4886 | jorpiell | public boolean isVisible() { |
150 | // TODO Auto-generated method stub
|
||
151 | return false; |
||
152 | } |
||
153 | |||
154 | 17740 | ppiqueras | /**
|
155 | * Prepares support for the icons that can be used in the WFS extension.
|
||
156 | */
|
||
157 | 14818 | jmvivo | void initilizeIcons(){
|
158 | // FLyrWFS.java
|
||
159 | 15632 | jmvivo | PluginServices.getIconTheme().registerDefault( |
160 | 14818 | jmvivo | "WFS-icolayer",
|
161 | this.getClass().getClassLoader().getResource("images/icoLayer.png") |
||
162 | ); |
||
163 | |||
164 | // WFSAreaPanel.java
|
||
165 | 15632 | jmvivo | PluginServices.getIconTheme().registerDefault( |
166 | 14818 | jmvivo | "edit-undo",
|
167 | this.getClass().getClassLoader().getResource("images/edit-undo.png") |
||
168 | ); |
||
169 | |||
170 | // WFSAreaPanel.java
|
||
171 | 15632 | jmvivo | PluginServices.getIconTheme().registerDefault( |
172 | 14818 | jmvivo | "WFS-move",
|
173 | this.getClass().getClassLoader().getResource("images/move.png") |
||
174 | ); |
||
175 | |||
176 | // WFSAreaPanel.java
|
||
177 | 15632 | jmvivo | PluginServices.getIconTheme().registerDefault( |
178 | 14818 | jmvivo | "WFS-scaling",
|
179 | this.getClass().getClassLoader().getResource("images/scaling.png") |
||
180 | ); |
||
181 | |||
182 | // WFSAreaPanel.java
|
||
183 | 15632 | jmvivo | PluginServices.getIconTheme().registerDefault( |
184 | 14818 | jmvivo | "view-pan",
|
185 | this.getClass().getClassLoader().getResource("images/Pan.png") |
||
186 | ); |
||
187 | |||
188 | // WFSAreaPanel.java
|
||
189 | 15632 | jmvivo | PluginServices.getIconTheme().registerDefault( |
190 | 14818 | jmvivo | "view-zoom-in",
|
191 | this.getClass().getClassLoader().getResource("images/ZoomIn.png") |
||
192 | ); |
||
193 | |||
194 | // WFSAreaPanel.java
|
||
195 | 15632 | jmvivo | PluginServices.getIconTheme().registerDefault( |
196 | 14818 | jmvivo | "view-zoom-out",
|
197 | this.getClass().getClassLoader().getResource("images/ZoomOut.png") |
||
198 | ); |
||
199 | |||
200 | // WFSAreaPanel.java
|
||
201 | 15632 | jmvivo | PluginServices.getIconTheme().registerDefault( |
202 | 14818 | jmvivo | "view-zoom-back",
|
203 | this.getClass().getClassLoader().getResource("images/ZoomPrevio.png") |
||
204 | ); |
||
205 | |||
206 | // WFSAreaPanel.java
|
||
207 | 15632 | jmvivo | PluginServices.getIconTheme().registerDefault( |
208 | 14818 | jmvivo | "view-zoom-map-contents",
|
209 | this.getClass().getClassLoader().getResource("images/MapContents.png") |
||
210 | ); |
||
211 | |||
212 | // WFSAreaPanel.java
|
||
213 | 15632 | jmvivo | PluginServices.getIconTheme().registerDefault( |
214 | 14818 | jmvivo | "view-zoom-mas",
|
215 | this.getClass().getClassLoader().getResource("images/zoommas.png") |
||
216 | ); |
||
217 | |||
218 | // WFSAreaPanel.java
|
||
219 | 15632 | jmvivo | PluginServices.getIconTheme().registerDefault( |
220 | 14818 | jmvivo | "view-zoom-menos",
|
221 | this.getClass().getClassLoader().getResource("images/zoommenos.png") |
||
222 | ); |
||
223 | |||
224 | // WFSAreaPanel.java
|
||
225 | 15632 | jmvivo | PluginServices.getIconTheme().registerDefault( |
226 | 14818 | jmvivo | "view-query-distance",
|
227 | this.getClass().getClassLoader().getResource("images/Distancia.png") |
||
228 | ); |
||
229 | |||
230 | // WFSAreaPanel.java
|
||
231 | 15632 | jmvivo | PluginServices.getIconTheme().registerDefault( |
232 | 14818 | jmvivo | "view-query-area",
|
233 | this.getClass().getClassLoader().getResource("images/Poligono16.png") |
||
234 | ); |
||
235 | |||
236 | // WFSAreaPanel.java
|
||
237 | 15632 | jmvivo | PluginServices.getIconTheme().registerDefault( |
238 | 16400 | jpiera | "validate-area",
|
239 | this.getClass().getClassLoader().getResource("images/validate-area.png") |
||
240 | 14818 | jmvivo | ); |
241 | } |
||
242 | 4886 | jorpiell | } |