Statistics
| Revision:

svn-gvsig-desktop / trunk / extensions / extWFS2 / src / com / iver / cit / gvsig / wfs / WFSClientExtension.java @ 17593

History | View | Annotate | Download (7.49 KB)

1
package com.iver.cit.gvsig.wfs;
2

    
3
import com.iver.andami.PluginServices;
4
import com.iver.andami.plugins.Extension;
5
import com.iver.cit.gvsig.AddLayer;
6
import com.iver.cit.gvsig.fmap.layers.FLyrWFS;
7
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
import com.iver.cit.gvsig.gui.toc.WFSPropsTocMenuEntry;
14
import com.iver.cit.gvsig.gui.toc.WFSVectorialPropsTocMenuEntry;
15
import com.iver.cit.gvsig.gui.wizards.WFSWizard;
16
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
import com.iver.cit.gvsig.project.documents.view.toc.gui.FPopupMenu;
21
import com.iver.utiles.extensionPoints.ExtensionPoints;
22
import com.iver.utiles.extensionPoints.ExtensionPointsSingleton;
23

    
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: WFSClientExtension.java 17593 2007-12-18 13:08:46Z jpiera $
67
 * $Log: WFSClientExtension.java,v $
68
 * Revision 1.9  2007/09/04 10:53:52  caballero
69
 * show page
70
 *
71
 * Revision 1.8  2006/10/02 09:09:45  jorpiell
72
 * Cambios del 10 copiados al head
73
 *
74
 * Revision 1.6  2006/09/05 15:41:52  jorpiell
75
 * A?adida la funcionalidad de cargar WFS desde el cat?logo
76
 *
77
 * Revision 1.5  2006/07/05 12:04:50  jorpiell
78
 * A?adida la opci?n de propiedades vectoriales
79
 *
80
 * Revision 1.4  2006/06/21 12:35:45  jorpiell
81
 * 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
 * Ahora hereda de Extension
85
 *
86
 * Revision 1.1  2006/04/19 12:50:16  jorpiell
87
 * 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
public class WFSClientExtension extends Extension{
95

    
96
        public void initialize() {
97
                System.out.println("A?ado Wizard WFS2.");                
98
                
99
                // Adds a new tab to the "add layer" wizard for WFS layer creation
100
                AddLayer.addWizard(WFSWizard.class);
101
                ExtensionPoints extensionPoints = ExtensionPointsSingleton.getInstance();
102
            //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

    
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
            initilizeIcons();
120
        }
121

    
122
        public void execute(String actionCommand) {
123
                // TODO Auto-generated method stub
124

    
125
        }
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
        void initilizeIcons(){
138
                // FLyrWFS.java
139
                PluginServices.getIconTheme().registerDefault(
140
                            "WFS-icolayer",
141
                            this.getClass().getClassLoader().getResource("images/icoLayer.png")
142
                    );
143

    
144
                // WFSAreaPanel.java
145
                PluginServices.getIconTheme().registerDefault(
146
                            "edit-undo",
147
                            this.getClass().getClassLoader().getResource("images/edit-undo.png")
148
                    );
149

    
150
                // WFSAreaPanel.java
151
                PluginServices.getIconTheme().registerDefault(
152
                            "WFS-move",
153
                            this.getClass().getClassLoader().getResource("images/move.png")
154
                    );
155

    
156
                // WFSAreaPanel.java
157
                PluginServices.getIconTheme().registerDefault(
158
                            "WFS-scaling",
159
                            this.getClass().getClassLoader().getResource("images/scaling.png")
160
                    );
161

    
162
                // WFSAreaPanel.java
163
                PluginServices.getIconTheme().registerDefault(
164
                            "view-pan",
165
                            this.getClass().getClassLoader().getResource("images/Pan.png")
166
                    );
167

    
168
                // WFSAreaPanel.java
169
                PluginServices.getIconTheme().registerDefault(
170
                            "view-zoom-in",
171
                            this.getClass().getClassLoader().getResource("images/ZoomIn.png")
172
                    );
173

    
174
                // WFSAreaPanel.java
175
                PluginServices.getIconTheme().registerDefault(
176
                            "view-zoom-out",
177
                            this.getClass().getClassLoader().getResource("images/ZoomOut.png")
178
                    );
179

    
180
                // WFSAreaPanel.java
181
                PluginServices.getIconTheme().registerDefault(
182
                            "view-zoom-back",
183
                            this.getClass().getClassLoader().getResource("images/ZoomPrevio.png")
184
                    );
185

    
186
                // WFSAreaPanel.java
187
                PluginServices.getIconTheme().registerDefault(
188
                            "view-zoom-map-contents",
189
                            this.getClass().getClassLoader().getResource("images/MapContents.png")
190
                    );
191

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

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

    
204
                //                 WFSAreaPanel.java
205
                PluginServices.getIconTheme().registerDefault(
206
                            "view-query-distance",
207
                            this.getClass().getClassLoader().getResource("images/Distancia.png")
208
                    );
209

    
210
                //                 WFSAreaPanel.java
211
                PluginServices.getIconTheme().registerDefault(
212
                            "view-query-area",
213
                            this.getClass().getClassLoader().getResource("images/Poligono16.png")
214
                    );
215

    
216
                //                 WFSAreaPanel.java
217
                PluginServices.getIconTheme().registerDefault(
218
                            "validate-area",
219
                            this.getClass().getClassLoader().getResource("images/validate-area.png")
220
                    );
221

    
222

    
223

    
224
        }
225
}