Statistics
| Revision:

svn-gvsig-desktop / trunk / extensions / extGeoprocessingExtensions / src / com / iver / cit / gvsig / topology / lineclean / LineCleanGeoprocessPlugin.java @ 9182

History | View | Annotate | Download (3.18 KB)

1
/*
2
 * Created on 10-oct-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: LineCleanGeoprocessPlugin.java 9182 2006-12-04 19:43:54Z azabala $
47
* $Log$
48
* Revision 1.1  2006-12-04 19:42:23  azabala
49
* *** empty log message ***
50
*
51
* Revision 1.2  2006/10/17 18:25:53  azabala
52
* *** empty log message ***
53
*
54
* Revision 1.1  2006/10/10 18:50:17  azabala
55
* First version in CVS
56
*
57
*
58
*/
59
package com.iver.cit.gvsig.topology.lineclean;
60

    
61
import java.net.URL;
62
import java.util.Locale;
63

    
64
import com.iver.andami.PluginServices;
65
import com.iver.cit.gvsig.fmap.layers.FLayers;
66
import com.iver.cit.gvsig.geoprocess.core.IGeoprocessController;
67
import com.iver.cit.gvsig.geoprocess.core.IGeoprocessPlugin;
68
import com.iver.cit.gvsig.geoprocess.core.gui.IGeoprocessPanel;
69
import com.iver.cit.gvsig.project.documents.view.gui.View;
70
import com.iver.cit.gvsig.topology.lineclean.gui.LineCleanGeoprocessPanel;
71

    
72
public class LineCleanGeoprocessPlugin implements IGeoprocessPlugin {
73

    
74
        private static String dataConvertPkg;
75
        private static String geoprocessName;
76
        
77
        static{
78
                dataConvertPkg = 
79
                        PluginServices.getText(null, "Conversion_de_datos");
80
                geoprocessName =
81
                        PluginServices.getText(null, "LineClean");
82
        }
83
        
84
        
85
        
86
        public IGeoprocessPanel getGeoprocessPanel() {
87
                View vista = (View)PluginServices.
88
                getMDIManager().
89
                getActiveWindow();
90
                FLayers layers = vista.getModel().
91
                        getMapContext().
92
                        getLayers();
93
                
94
                return new LineCleanGeoprocessPanel(layers);
95
        }
96

    
97
        public URL getHtmlDescription() {
98
                Locale locale = Locale.getDefault();
99
                String localeStr = locale.getLanguage();
100
                String urlStr = "resources/description_" +
101
                                                                                localeStr +
102
                                                                                        ".html";
103
                URL url = LineCleanGeoprocessPlugin.class.
104
                getResource(urlStr);
105
                return url;
106
        }
107

    
108
        public URL getImgDescription() {
109
                URL url = LineCleanGeoprocessPlugin.class.
110
                        getResource("resources/linecleandesc.png");
111
                return url;
112
        }
113

    
114
        public IGeoprocessController getGpController() {
115
                return new LineCleanGeoprocessController();
116
        }
117

    
118
        public String getNamespace() {
119
                return dataConvertPkg + "/" + geoprocessName;
120
        }
121
        
122
        public String toString(){
123
                return geoprocessName;
124
        }
125

    
126
}
127