Statistics
| Revision:

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

History | View | Annotate | Download (7.53 KB)

1
package org.gvsig.wfs;
2

    
3
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
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
8
import org.gvsig.gui.beans.panelGroup.PanelGroupManager;
9
import org.gvsig.tools.ToolsLocator;
10
import org.gvsig.tools.extensionpoint.ExtensionPoint;
11
import org.gvsig.tools.extensionpoint.ExtensionPointManager;
12
import org.gvsig.wfs.gui.panels.WFSAreaPanel;
13
import org.gvsig.wfs.gui.panels.WFSFilterPanel;
14
import org.gvsig.wfs.gui.panels.WFSInfoPanel;
15
import org.gvsig.wfs.gui.panels.WFSOptionsPanel;
16
import org.gvsig.wfs.gui.panels.WFSParamsPanel;
17
import org.gvsig.wfs.gui.panels.WFSSelectFeaturePanel;
18
import org.gvsig.wfs.gui.panels.WFSSelectFieldsPanel;
19
import org.gvsig.wfs.gui.toc.WFSProperties;
20
import org.gvsig.wfs.gui.wizards.WFSWizard;
21

    
22

    
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: WFSClientExtension.java 18381 2008-01-30 12:00:25Z jpiera $
66
 * $Log$
67
 * Revision 1.6.2.2  2006-11-17 11:28:45  ppiqueras
68
 * Corregidos bugs y a?adida nueva funcionalidad.
69
 *
70
 * Revision 1.8  2006/10/02 09:09:45  jorpiell
71
 * Cambios del 10 copiados al head
72
 *
73
 * Revision 1.6  2006/09/05 15:41:52  jorpiell
74
 * A?adida la funcionalidad de cargar WFS desde el cat?logo
75
 *
76
 * Revision 1.5  2006/07/05 12:04:50  jorpiell
77
 * A?adida la opci?n de propiedades vectoriales
78
 *
79
 * Revision 1.4  2006/06/21 12:35:45  jorpiell
80
 * 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
 * Ahora hereda de Extension
84
 *
85
 * Revision 1.1  2006/04/19 12:50:16  jorpiell
86
 * Primer commit de la aplicaci?n. Se puede hacer un getCapabilities y ver el mensaje de vienvenida del servidor
87
 *
88
 *
89
 */
90
/**
91
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
92
 */
93
public class WFSClientExtension extends Extension{
94

    
95
        public void initialize() {
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 tabs:
103
                ExtensionPoint wfsTabExtensionPoint = extensionPointManager.add("WFSPropertiesDialog");
104
                wfsTabExtensionPoint.append("info", "", WFSInfoPanel.class);
105
                wfsTabExtensionPoint.append("features", "", WFSSelectFeaturePanel.class);
106
                wfsTabExtensionPoint.append("fields", "", WFSSelectFieldsPanel.class);
107
                wfsTabExtensionPoint.append("options", "", WFSOptionsPanel.class);
108
                wfsTabExtensionPoint.append("filter", "", WFSFilterPanel.class);
109
                wfsTabExtensionPoint.append("area", "", WFSAreaPanel.class);
110
                
111
                //Adding forms to the generic vectorial properties
112
                ThemeManagerWindow.addPage(WFSProperties.class);
113
                ThemeManagerWindow.setTabEnabledForLayer(WFSProperties.class, FLyrVect.class, true);
114
                
115
              // Registers this class as a "PanelGroup" type
116
        PanelGroupManager.getManager().registerPanelGroup(WFSParamsPanel.class);
117

    
118
        // Sets this class as the default "PanelGroup" type
119
        PanelGroupManager.getManager().setDefaultType(WFSParamsPanel.class);
120
                
121
            initilizeIcons();                
122
        }
123

    
124
        /*
125
         * (non-Javadoc)
126
         * @see com.iver.andami.plugins.IExtension#execute(java.lang.String)
127
         */
128
        public void execute(String actionCommand) {
129
                // TODO Auto-generated method stub
130
                
131
        }        
132

    
133
        /*
134
         * (non-Javadoc)
135
         * @see com.iver.andami.plugins.IExtension#isEnabled()
136
         */
137
        public boolean isEnabled() {
138
                // TODO Auto-generated method stub
139
                return false;
140
        }
141

    
142
        /*
143
         * (non-Javadoc)
144
         * @see com.iver.andami.plugins.IExtension#isVisible()
145
         */
146
        public boolean isVisible() {
147
                // TODO Auto-generated method stub
148
                return false;
149
        }
150
        
151
        /**
152
         * Prepares support for the icons that can be used in the WFS extension.
153
         */
154
        void initilizeIcons(){
155
                // FLyrWFS.java
156
                PluginServices.getIconTheme().registerDefault(
157
                            "WFS-icolayer",
158
                            this.getClass().getClassLoader().getResource("images/icoLayer.png")
159
                    );
160

    
161
                // WFSAreaPanel.java
162
                PluginServices.getIconTheme().registerDefault(
163
                            "edit-undo",
164
                            this.getClass().getClassLoader().getResource("images/edit-undo.png")
165
                    );
166

    
167
                // WFSAreaPanel.java
168
                PluginServices.getIconTheme().registerDefault(
169
                            "WFS-move",
170
                            this.getClass().getClassLoader().getResource("images/move.png")
171
                    );
172

    
173
                // WFSAreaPanel.java
174
                PluginServices.getIconTheme().registerDefault(
175
                            "WFS-scaling",
176
                            this.getClass().getClassLoader().getResource("images/scaling.png")
177
                    );
178

    
179
                // WFSAreaPanel.java
180
                PluginServices.getIconTheme().registerDefault(
181
                            "view-pan",
182
                            this.getClass().getClassLoader().getResource("images/Pan.png")
183
                    );
184

    
185
                // WFSAreaPanel.java
186
                PluginServices.getIconTheme().registerDefault(
187
                            "view-zoom-in",
188
                            this.getClass().getClassLoader().getResource("images/ZoomIn.png")
189
                    );
190

    
191
                // WFSAreaPanel.java
192
                PluginServices.getIconTheme().registerDefault(
193
                            "view-zoom-out",
194
                            this.getClass().getClassLoader().getResource("images/ZoomOut.png")
195
                    );
196

    
197
                // WFSAreaPanel.java
198
                PluginServices.getIconTheme().registerDefault(
199
                            "view-zoom-back",
200
                            this.getClass().getClassLoader().getResource("images/ZoomPrevio.png")
201
                    );
202

    
203
                // WFSAreaPanel.java
204
                PluginServices.getIconTheme().registerDefault(
205
                            "view-zoom-map-contents",
206
                            this.getClass().getClassLoader().getResource("images/MapContents.png")
207
                    );
208

    
209
                // WFSAreaPanel.java
210
                PluginServices.getIconTheme().registerDefault(
211
                            "view-zoom-mas",
212
                            this.getClass().getClassLoader().getResource("images/zoommas.png")
213
                    );
214

    
215
                //                 WFSAreaPanel.java
216
                PluginServices.getIconTheme().registerDefault(
217
                            "view-zoom-menos",
218
                            this.getClass().getClassLoader().getResource("images/zoommenos.png")
219
                    );
220

    
221
                //                 WFSAreaPanel.java
222
                PluginServices.getIconTheme().registerDefault(
223
                            "view-query-distance",
224
                            this.getClass().getClassLoader().getResource("images/Distancia.png")
225
                    );
226

    
227
                //                 WFSAreaPanel.java
228
                PluginServices.getIconTheme().registerDefault(
229
                            "view-query-area",
230
                            this.getClass().getClassLoader().getResource("images/Poligono16.png")
231
                    );
232

    
233
                //                 WFSAreaPanel.java
234
                PluginServices.getIconTheme().registerDefault(
235
                            "validate-area",
236
                            this.getClass().getClassLoader().getResource("images/validate-area.png")
237
                    );
238
        }
239

    
240
}