root / trunk / extensions / extTopology / src / org / gvsig / topology / RegisterGeoprocessesExtension.java @ 32785
History | View | Annotate | Download (5.8 KB)
1 |
/*
|
---|---|
2 |
* Created on 10-abr-2006
|
3 |
*
|
4 |
* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
5 |
*
|
6 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
7 |
*
|
8 |
* This program is free software; you can redistribute it and/or
|
9 |
* modify it under the terms of the GNU General Public License
|
10 |
* as published by the Free Software Foundation; either version 2
|
11 |
* of the License, or (at your option) any later version.
|
12 |
*
|
13 |
* This program is distributed in the hope that it will be useful,
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16 |
* GNU General Public License for more details.
|
17 |
*
|
18 |
* You should have received a copy of the GNU General Public License
|
19 |
* along with this program; if not, write to the Free Software
|
20 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
21 |
*
|
22 |
* For more information, contact:
|
23 |
*
|
24 |
* Generalitat Valenciana
|
25 |
* Conselleria d'Infraestructures i Transport
|
26 |
* Av. Blasco Ib??ez, 50
|
27 |
* 46010 VALENCIA
|
28 |
* SPAIN
|
29 |
*
|
30 |
* +34 963862235
|
31 |
* gvsig@gva.es
|
32 |
* www.gvsig.gva.es
|
33 |
*
|
34 |
* or
|
35 |
*
|
36 |
* IVER T.I. S.A
|
37 |
* Salamanca 50
|
38 |
* 46005 Valencia
|
39 |
* Spain
|
40 |
*
|
41 |
* +34 963163400
|
42 |
* dac@iver.es
|
43 |
*/
|
44 |
/* CVS MESSAGES:
|
45 |
*
|
46 |
* $Id:
|
47 |
* $Log:
|
48 |
*/
|
49 |
package org.gvsig.topology; |
50 |
|
51 |
import com.iver.andami.PluginServices; |
52 |
import com.iver.andami.plugins.Extension; |
53 |
import com.iver.cit.gvsig.geoprocess.impl.build.BuildGeoprocessPlugin; |
54 |
import com.iver.cit.gvsig.geoprocess.impl.clean.CleanGeoprocessPlugin; |
55 |
import com.iver.cit.gvsig.geoprocess.impl.fliplines.FlipLinesGeoprocessPlugin; |
56 |
import com.iver.cit.gvsig.geoprocess.impl.generalization.GeneralizationGeoprocessPlugin; |
57 |
import com.iver.cit.gvsig.geoprocess.impl.lineclean.LineCleanGeoprocessPlugin; |
58 |
import com.iver.cit.gvsig.geoprocess.impl.lineorpolygontopoints.LineToPointsGeoprocessPlugin; |
59 |
import com.iver.cit.gvsig.geoprocess.impl.polygonbuild.PolygonBuildGeoprocessPlugin; |
60 |
import com.iver.cit.gvsig.geoprocess.impl.polytolines.PolyToLinesGeoprocessPlugin; |
61 |
import com.iver.cit.gvsig.geoprocess.impl.referencing.ReferencingGeoprocessPlugin; |
62 |
import com.iver.cit.gvsig.geoprocess.impl.smooth.SmoothGeoprocessPlugin; |
63 |
import com.iver.cit.gvsig.geoprocess.impl.snapandcrack.SnapAndCrackGeoprocessPlugin; |
64 |
import com.iver.cit.gvsig.geoprocess.impl.voronoi.VoronoiGeoprocessPlugin; |
65 |
import com.iver.utiles.extensionPoints.ExtensionPoints; |
66 |
import com.iver.utiles.extensionPoints.ExtensionPointsSingleton; |
67 |
|
68 |
public class RegisterGeoprocessesExtension extends Extension{ |
69 |
|
70 |
public void initialize() { |
71 |
ExtensionPoints extensionPoints = |
72 |
ExtensionPointsSingleton.getInstance(); |
73 |
// extensionPoints.add("GeoprocessManager",
|
74 |
// "SNAPANDCRACK",
|
75 |
// SnapAndCrackGeoprocessPlugin.class);
|
76 |
extensionPoints.add("GeoprocessManager",
|
77 |
"VORONOI",
|
78 |
VoronoiGeoprocessPlugin.class); |
79 |
|
80 |
extensionPoints.add("GeoprocessManager",
|
81 |
"GENERALIZATION",
|
82 |
GeneralizationGeoprocessPlugin.class); |
83 |
|
84 |
extensionPoints.add("GeoprocessManager",
|
85 |
"FLIPLINES",
|
86 |
FlipLinesGeoprocessPlugin.class); |
87 |
|
88 |
extensionPoints.add("GeoprocessManager",
|
89 |
"POLYGONTOLINES",
|
90 |
PolyToLinesGeoprocessPlugin.class); |
91 |
|
92 |
extensionPoints.add("GeoprocessManager",
|
93 |
"POLYGONORLINESTOPOINTS",
|
94 |
LineToPointsGeoprocessPlugin.class); |
95 |
|
96 |
extensionPoints.add("GeoprocessManager",
|
97 |
"SMOOTH_GEOMETRIES",
|
98 |
SmoothGeoprocessPlugin.class); |
99 |
|
100 |
extensionPoints.add("GeoprocessManager",
|
101 |
"SPATIAL_ADJUST",
|
102 |
ReferencingGeoprocessPlugin.class); |
103 |
|
104 |
extensionPoints.add("GeoprocessManager",
|
105 |
"LineClean",
|
106 |
CleanGeoprocessPlugin.class); |
107 |
|
108 |
extensionPoints.add("GeoprocessManager",
|
109 |
"PolygonBuild",
|
110 |
BuildGeoprocessPlugin.class); |
111 |
|
112 |
|
113 |
/*
|
114 |
extensionPoints.add("GeoprocessManager",
|
115 |
"LINECLEAN",
|
116 |
LineCleanGeoprocessPlugin.class);
|
117 |
|
118 |
extensionPoints.add("GeoprocessManager",
|
119 |
"POLYGONBUILD",
|
120 |
PolygonBuildGeoprocessPlugin.class);
|
121 |
*/
|
122 |
|
123 |
registerIcons(); |
124 |
} |
125 |
|
126 |
private void registerIcons(){ |
127 |
PluginServices.getIconTheme().registerDefault( |
128 |
"voroidesc-icon",
|
129 |
VoronoiGeoprocessPlugin.class.getResource("resources/voronoi_desc.png")
|
130 |
); |
131 |
|
132 |
PluginServices.getIconTheme().registerDefault( |
133 |
"generalizationdesc-icon",
|
134 |
GeneralizationGeoprocessPlugin.class.getResource("resources/generalization_desc.png")
|
135 |
); |
136 |
PluginServices.getIconTheme().registerDefault( |
137 |
"crackdesc-icon",
|
138 |
SnapAndCrackGeoprocessPlugin.class.getResource("resources/crackdesc.png")
|
139 |
); |
140 |
|
141 |
PluginServices.getIconTheme().registerDefault( |
142 |
"fliplines-icon",
|
143 |
FlipLinesGeoprocessPlugin.class.getResource("resources/flipline_desc.png")
|
144 |
); |
145 |
|
146 |
PluginServices.getIconTheme().registerDefault( |
147 |
"polytolines-icon",
|
148 |
PolyToLinesGeoprocessPlugin.class.getResource("resources/polygontoline_desc.gif")
|
149 |
); |
150 |
|
151 |
PluginServices.getIconTheme().registerDefault( |
152 |
"linetopoints-icon",
|
153 |
LineToPointsGeoprocessPlugin.class.getResource("resources/linetopoint_desc.gif")
|
154 |
); |
155 |
|
156 |
PluginServices.getIconTheme().registerDefault( |
157 |
"smoothdesc-icon",
|
158 |
SmoothGeoprocessPlugin.class.getResource("resources/smooth_desc.gif")
|
159 |
); |
160 |
|
161 |
PluginServices.getIconTheme().registerDefault( |
162 |
"spatialadjustdesc-icon",
|
163 |
ReferencingGeoprocessPlugin.class.getResource("resources/spatial_ adjust_desc.gif")
|
164 |
); |
165 |
|
166 |
PluginServices.getIconTheme().registerDefault( |
167 |
"clean-icon",
|
168 |
CleanGeoprocessPlugin.class.getResource("resources/spatial_ adjust_desc.gif")
|
169 |
); |
170 |
|
171 |
PluginServices.getIconTheme().registerDefault( |
172 |
"build-icon",
|
173 |
BuildGeoprocessPlugin.class.getResource("resources/spatial_ adjust_desc.gif")
|
174 |
); |
175 |
|
176 |
} |
177 |
|
178 |
public void execute(String actionCommand) { |
179 |
} |
180 |
|
181 |
public boolean isEnabled() { |
182 |
return true; |
183 |
} |
184 |
|
185 |
public boolean isVisible() { |
186 |
return true; |
187 |
} |
188 |
} |
189 |
|