Statistics
| Revision:

root / trunk / extensions / extTopology / src / org / gvsig / topology / RegisterGeoprocessesExtension.java @ 22892

History | View | Annotate | Download (4.79 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.fliplines.FlipLinesGeoprocessPlugin;
54
import com.iver.cit.gvsig.geoprocess.impl.generalization.GeneralizationGeoprocessPlugin;
55
import com.iver.cit.gvsig.geoprocess.impl.lineorpolygontopoints.LineToPointsGeoprocessPlugin;
56
import com.iver.cit.gvsig.geoprocess.impl.polytolines.PolyToLinesGeoprocessPlugin;
57
import com.iver.cit.gvsig.geoprocess.impl.referencing.ReferencingGeoprocessPlugin;
58
import com.iver.cit.gvsig.geoprocess.impl.smooth.SmoothGeoprocessPlugin;
59
import com.iver.cit.gvsig.geoprocess.impl.snapandcrack.SnapAndCrackGeoprocessPlugin;
60
import com.iver.cit.gvsig.geoprocess.impl.voronoi.VoronoiGeoprocessPlugin;
61
import com.iver.utiles.extensionPoints.ExtensionPoints;
62
import com.iver.utiles.extensionPoints.ExtensionPointsSingleton;
63

    
64
public class RegisterGeoprocessesExtension extends Extension{
65

    
66
        public void initialize() {
67
                ExtensionPoints extensionPoints = 
68
                        ExtensionPointsSingleton.getInstance();
69
//                extensionPoints.add("GeoprocessManager",
70
//                                "SNAPANDCRACK", 
71
//                                SnapAndCrackGeoprocessPlugin.class);
72
                extensionPoints.add("GeoprocessManager",
73
                                "VORONOI", 
74
                                VoronoiGeoprocessPlugin.class);
75
                
76
                extensionPoints.add("GeoprocessManager",
77
                                "GENERALIZATION", 
78
                                GeneralizationGeoprocessPlugin.class);
79
                
80
                extensionPoints.add("GeoprocessManager",
81
                                "FLIPLINES", 
82
                                FlipLinesGeoprocessPlugin.class);
83
                
84
                extensionPoints.add("GeoprocessManager",
85
                                "POLYGONTOLINES", 
86
                                PolyToLinesGeoprocessPlugin.class);
87
                
88
                extensionPoints.add("GeoprocessManager",
89
                                "POLYGONORLINESTOPOINTS", 
90
                                LineToPointsGeoprocessPlugin.class);
91
                
92
                extensionPoints.add("GeoprocessManager",
93
                                "SMOOTH_GEOMETRIES", 
94
                                SmoothGeoprocessPlugin.class);
95
                
96
                extensionPoints.add("GeoprocessManager",
97
                                "SPATIAL_ADJUST", 
98
                                ReferencingGeoprocessPlugin.class);
99
                registerIcons();
100
        }
101
        
102
        private void registerIcons(){
103
                PluginServices.getIconTheme().registerDefault(
104
                                "voroidesc-icon",
105
                                VoronoiGeoprocessPlugin.class.getResource("resources/voronoi_desc.png")
106
                        );
107
                
108
                PluginServices.getIconTheme().registerDefault(
109
                                "generalizationdesc-icon",
110
                                GeneralizationGeoprocessPlugin.class.getResource("resources/generalization_desc.png")
111
                        );
112
                PluginServices.getIconTheme().registerDefault(
113
                                "crackdesc-icon",
114
                                SnapAndCrackGeoprocessPlugin.class.getResource("resources/crackdesc.png")
115
                        );
116
                
117
                PluginServices.getIconTheme().registerDefault(
118
                                "fliplines-icon",
119
                                FlipLinesGeoprocessPlugin.class.getResource("resources/flipline_desc.png")
120
                        );
121
                
122
                PluginServices.getIconTheme().registerDefault(
123
                                "polytolines-icon",
124
                                PolyToLinesGeoprocessPlugin.class.getResource("resources/polygontoline_desc.gif")
125
                        );
126
                
127
                PluginServices.getIconTheme().registerDefault(
128
                                "linetopoints-icon",
129
                                LineToPointsGeoprocessPlugin.class.getResource("resources/linetopoint_desc.gif")
130
                        );
131
                
132
                PluginServices.getIconTheme().registerDefault(
133
                                "smoothdesc-icon",
134
                                SmoothGeoprocessPlugin.class.getResource("resources/smooth_desc.gif")
135
                        );
136
                
137
                PluginServices.getIconTheme().registerDefault(
138
                                "spatialadjustdesc-icon",
139
                                ReferencingGeoprocessPlugin.class.getResource("resources/spatial_ adjust_desc.gif")
140
                        );
141
                
142
                
143
                
144
        }
145
        
146
        public void execute(String actionCommand) {
147
        }
148

    
149
        public boolean isEnabled() {
150
                return true;
151
        }
152

    
153
        public boolean isVisible() {
154
                return true;
155
        }
156
}
157