svn-gvsig-desktop / branches / v2_0_0_prep / extensions / extWFS2 / src / org / gvsig / wfs / WFSClientExtension.java @ 40287
History | View | Annotate | Download (6.41 KB)
1 | 29645 | jpiera | package org.gvsig.wfs; |
---|---|---|---|
2 | 27885 | jpiera | |
3 | 38564 | jjdelcerro | import org.gvsig.andami.IconThemeHelper; |
4 | 29645 | jpiera | 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 | 38564 | jjdelcerro | import org.gvsig.fmap.dal.store.wfs.WFSStoreProvider; |
8 | import org.gvsig.fmap.mapcontext.MapContextLocator; |
||
9 | 27885 | jpiera | import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
10 | 36040 | jpiera | import org.gvsig.gui.beans.panelGroup.PanelGroupManager; |
11 | 27885 | jpiera | import org.gvsig.tools.ToolsLocator; |
12 | import org.gvsig.tools.extensionpoint.ExtensionPoint; |
||
13 | import org.gvsig.tools.extensionpoint.ExtensionPointManager; |
||
14 | 29645 | jpiera | import org.gvsig.wfs.gui.panels.WFSAreaPanel; |
15 | import org.gvsig.wfs.gui.panels.WFSFilterPanel; |
||
16 | import org.gvsig.wfs.gui.panels.WFSInfoPanel; |
||
17 | import org.gvsig.wfs.gui.panels.WFSOptionsPanel; |
||
18 | 36040 | jpiera | import org.gvsig.wfs.gui.panels.WFSParamsPanel; |
19 | 29645 | jpiera | import org.gvsig.wfs.gui.panels.WFSSelectFeaturePanel; |
20 | import org.gvsig.wfs.gui.panels.WFSSelectFieldsPanel; |
||
21 | import org.gvsig.wfs.gui.toc.WFSProperties; |
||
22 | import org.gvsig.wfs.gui.wizards.WFSWizard; |
||
23 | 27885 | jpiera | |
24 | |||
25 | /* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
||
26 | *
|
||
27 | * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
||
28 | *
|
||
29 | * This program is free software; you can redistribute it and/or
|
||
30 | * modify it under the terms of the GNU General Public License
|
||
31 | * as published by the Free Software Foundation; either version 2
|
||
32 | * of the License, or (at your option) any later version.
|
||
33 | *
|
||
34 | * This program is distributed in the hope that it will be useful,
|
||
35 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
36 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
37 | * GNU General Public License for more details.
|
||
38 | *
|
||
39 | * You should have received a copy of the GNU General Public License
|
||
40 | * along with this program; if not, write to the Free Software
|
||
41 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
||
42 | *
|
||
43 | * For more information, contact:
|
||
44 | *
|
||
45 | * Generalitat Valenciana
|
||
46 | * Conselleria d'Infraestructures i Transport
|
||
47 | * Av. Blasco Ib??ez, 50
|
||
48 | * 46010 VALENCIA
|
||
49 | * SPAIN
|
||
50 | *
|
||
51 | * +34 963862235
|
||
52 | * gvsig@gva.es
|
||
53 | * www.gvsig.gva.es
|
||
54 | *
|
||
55 | * or
|
||
56 | *
|
||
57 | * IVER T.I. S.A
|
||
58 | * Salamanca 50
|
||
59 | * 46005 Valencia
|
||
60 | * Spain
|
||
61 | *
|
||
62 | * +34 963163400
|
||
63 | * dac@iver.es
|
||
64 | */
|
||
65 | /* CVS MESSAGES:
|
||
66 | *
|
||
67 | * $Id: WFSClientExtension.java 18381 2008-01-30 12:00:25Z jpiera $
|
||
68 | * $Log$
|
||
69 | * Revision 1.6.2.2 2006-11-17 11:28:45 ppiqueras
|
||
70 | * Corregidos bugs y a?adida nueva funcionalidad.
|
||
71 | *
|
||
72 | * Revision 1.8 2006/10/02 09:09:45 jorpiell
|
||
73 | * Cambios del 10 copiados al head
|
||
74 | *
|
||
75 | * Revision 1.6 2006/09/05 15:41:52 jorpiell
|
||
76 | * A?adida la funcionalidad de cargar WFS desde el cat?logo
|
||
77 | *
|
||
78 | * Revision 1.5 2006/07/05 12:04:50 jorpiell
|
||
79 | * A?adida la opci?n de propiedades vectoriales
|
||
80 | *
|
||
81 | * Revision 1.4 2006/06/21 12:35:45 jorpiell
|
||
82 | * 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
|
||
83 | *
|
||
84 | * Revision 1.3 2006/05/19 12:57:34 jorpiell
|
||
85 | * Ahora hereda de Extension
|
||
86 | *
|
||
87 | * Revision 1.1 2006/04/19 12:50:16 jorpiell
|
||
88 | * Primer commit de la aplicaci?n. Se puede hacer un getCapabilities y ver el mensaje de vienvenida del servidor
|
||
89 | *
|
||
90 | *
|
||
91 | */
|
||
92 | /**
|
||
93 | * @author Jorge Piera Llodr? (piera_jor@gva.es)
|
||
94 | */
|
||
95 | public class WFSClientExtension extends Extension{ |
||
96 | |||
97 | public void initialize() { |
||
98 | // Adds a new tab to the "add layer" wizard for WFS layer creation
|
||
99 | AddLayer.addWizard(WFSWizard.class); |
||
100 | |||
101 | ExtensionPointManager extensionPointManager = ToolsLocator |
||
102 | .getExtensionPointManager(); |
||
103 | 36040 | jpiera | |
104 | 27885 | jpiera | //WFS properties tabs:
|
105 | ExtensionPoint wfsTabExtensionPoint = extensionPointManager.add("WFSPropertiesDialog");
|
||
106 | wfsTabExtensionPoint.append("info", "", WFSInfoPanel.class); |
||
107 | wfsTabExtensionPoint.append("features", "", WFSSelectFeaturePanel.class); |
||
108 | wfsTabExtensionPoint.append("fields", "", WFSSelectFieldsPanel.class); |
||
109 | wfsTabExtensionPoint.append("options", "", WFSOptionsPanel.class); |
||
110 | wfsTabExtensionPoint.append("filter", "", WFSFilterPanel.class); |
||
111 | wfsTabExtensionPoint.append("area", "", WFSAreaPanel.class); |
||
112 | |||
113 | //Adding forms to the generic vectorial properties
|
||
114 | ThemeManagerWindow.addPage(WFSProperties.class); |
||
115 | ThemeManagerWindow.setTabEnabledForLayer(WFSProperties.class, FLyrVect.class, true);
|
||
116 | |||
117 | 36040 | jpiera | // Registers this class as a "PanelGroup" type
|
118 | PanelGroupManager.getManager().registerPanelGroup(WFSParamsPanel.class); |
||
119 | |||
120 | // Sets this class as the default "PanelGroup" type
|
||
121 | PanelGroupManager.getManager().setDefaultType(WFSParamsPanel.class); |
||
122 | 27885 | jpiera | |
123 | initilizeIcons(); |
||
124 | } |
||
125 | |||
126 | /*
|
||
127 | * (non-Javadoc)
|
||
128 | * @see com.iver.andami.plugins.IExtension#execute(java.lang.String)
|
||
129 | */
|
||
130 | public void execute(String actionCommand) { |
||
131 | // TODO Auto-generated method stub
|
||
132 | |||
133 | } |
||
134 | |||
135 | /*
|
||
136 | * (non-Javadoc)
|
||
137 | * @see com.iver.andami.plugins.IExtension#isEnabled()
|
||
138 | */
|
||
139 | public boolean isEnabled() { |
||
140 | // TODO Auto-generated method stub
|
||
141 | return false; |
||
142 | } |
||
143 | |||
144 | /*
|
||
145 | * (non-Javadoc)
|
||
146 | * @see com.iver.andami.plugins.IExtension#isVisible()
|
||
147 | */
|
||
148 | public boolean isVisible() { |
||
149 | // TODO Auto-generated method stub
|
||
150 | return false; |
||
151 | } |
||
152 | |||
153 | /**
|
||
154 | * Prepares support for the icons that can be used in the WFS extension.
|
||
155 | */
|
||
156 | void initilizeIcons(){
|
||
157 | 38564 | jjdelcerro | IconThemeHelper.registerIcon("layer", "layer-icon-wfs", this); |
158 | MapContextLocator.getMapContextManager().registerIconLayer(WFSStoreProvider.NAME, "layer-icon-wfs");
|
||
159 | 27885 | jpiera | |
160 | // WFSAreaPanel.java
|
||
161 | 38564 | jjdelcerro | IconThemeHelper.registerIcon("wfs-properties", "wfs-properties-undo", this); |
162 | IconThemeHelper.registerIcon("wfs-properties", "wfs-properties-move", this); |
||
163 | IconThemeHelper.registerIcon("wfs-properties", "wfs-properties-scaling", this); // ??? |
||
164 | IconThemeHelper.registerIcon("wfs-properties", "wfs-properties-pan", this); |
||
165 | IconThemeHelper.registerIcon("wfs-properties", "wfs-properties-zoom-in", this); |
||
166 | IconThemeHelper.registerIcon("wfs-properties", "wfs-properties-zoom-out", this); |
||
167 | IconThemeHelper.registerIcon("wfs-properties", "wfs-properties-zoom-back", this); |
||
168 | IconThemeHelper.registerIcon("wfs-properties", "wfs-properties-zoom-all", this); |
||
169 | IconThemeHelper.registerIcon("wfs-properties", "wfs-properties-zoom-plus", this); |
||
170 | IconThemeHelper.registerIcon("wfs-properties", "wfs-properties-zoom-minus", this); |
||
171 | IconThemeHelper.registerIcon("wfs-properties", "wfs-properties-query-area", this); |
||
172 | IconThemeHelper.registerIcon("wfs-properties", "wfs-properties-query-distance", this); |
||
173 | IconThemeHelper.registerIcon("wfs-properties", "wfs-properties-validate-area", this); // ??? |
||
174 | 27885 | jpiera | } |
175 | |||
176 | } |