Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / extensions / extWFS2 / src / org / gvsig / wfs / WFSClientExtension.java @ 36035

History | View | Annotate | Download (7.82 KB)

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