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