Revision 6748 trunk/extensions/extGeoProcessing/src/com/iver/cit/gvsig/geoprocess/impl/dissolve/DissolveGeoprocessPlugin.java
DissolveGeoprocessPlugin.java | ||
---|---|---|
45 | 45 |
* |
46 | 46 |
* $Id$ |
47 | 47 |
* $Log$ |
48 |
* Revision 1.1 2006-06-27 16:11:41 azabala |
|
48 |
* Revision 1.2 2006-08-11 16:20:24 azabala |
|
49 |
* *** empty log message *** |
|
50 |
* |
|
51 |
* Revision 1.1 2006/06/27 16:11:41 azabala |
|
49 | 52 |
* toString() added to Plugin interface to force textual representation of geoprocess plugins |
50 | 53 |
* |
51 | 54 |
* |
... | ... | |
53 | 56 |
package com.iver.cit.gvsig.geoprocess.impl.dissolve; |
54 | 57 |
|
55 | 58 |
import java.net.URL; |
59 |
import java.util.Locale; |
|
56 | 60 |
|
57 | 61 |
import org.cresques.cts.IProjection; |
58 | 62 |
|
... | ... | |
63 | 67 |
import com.iver.cit.gvsig.geoprocess.core.IGeoprocessPlugin; |
64 | 68 |
import com.iver.cit.gvsig.geoprocess.core.gui.IGeoprocessPanel; |
65 | 69 |
import com.iver.cit.gvsig.geoprocess.impl.dissolve.gui.GeoProcessingDissolvePanel; |
70 |
import com.iver.cit.gvsig.geoprocess.impl.dissolve.gui.GeoProcessingDissolvePanel2; |
|
66 | 71 |
import com.iver.cit.gvsig.geoprocess.manager.GeoprocessManager; |
67 | 72 |
import com.iver.cit.gvsig.gui.View; |
68 | 73 |
|
69 | 74 |
public class DissolveGeoprocessPlugin implements IGeoprocessPlugin { |
75 |
|
|
76 |
private static String analisisPkg; |
|
77 |
private static String agregationPkg; |
|
78 |
private static String agregationPkgDesc; |
|
79 |
private static String geoprocessName; |
|
80 |
|
|
70 | 81 |
static{ |
82 |
analisisPkg = PluginServices.getText(null, "Analisis"); |
|
83 |
agregationPkg = PluginServices.getText(null, "Agregacion"); |
|
84 |
geoprocessName = PluginServices.getText(null, "Disolver"); |
|
85 |
|
|
86 |
agregationPkgDesc = PluginServices.getText(null, "Agregacion_Desc"); |
|
71 | 87 |
GeoprocessManager. |
72 |
registerPackageDescription("Analisis/Agregacion", |
|
73 |
"Las clases de este directorio transforman "+ |
|
74 |
"datos de entrada, de mayor detalle, en datos resumidos"); |
|
88 |
registerPackageDescription(analisisPkg + "/" + agregationPkg, |
|
89 |
agregationPkgDesc); |
|
75 | 90 |
} |
91 |
|
|
76 | 92 |
public IGeoprocessPanel getGeoprocessPanel() { |
77 | 93 |
View vista = (View)PluginServices.getMDIManager().getActiveView(); |
78 | 94 |
FMap mapContext = vista.getModel().getMapContext(); |
79 | 95 |
FLayers layers = mapContext.getLayers(); |
80 |
IProjection proj = mapContext.getProjection(); |
|
81 |
GeoProcessingDissolvePanel dataSelectionPanel = |
|
82 |
new GeoProcessingDissolvePanel(layers); |
|
96 |
GeoProcessingDissolvePanel2 dataSelectionPanel = |
|
97 |
new GeoProcessingDissolvePanel2(layers); |
|
83 | 98 |
return dataSelectionPanel; |
84 | 99 |
} |
85 | 100 |
|
86 | 101 |
public URL getHtmlDescription() { |
102 |
Locale locale = Locale.getDefault(); |
|
103 |
String localeStr = locale.getLanguage(); |
|
104 |
String urlStr = "resources/description_" + |
|
105 |
localeStr + |
|
106 |
".html"; |
|
87 | 107 |
return DissolveGeoprocessPlugin.class. |
88 |
getResource("resources/description.html");
|
|
108 |
getResource(urlStr);
|
|
89 | 109 |
} |
90 | 110 |
|
91 | 111 |
public URL getImgDescription() { |
... | ... | |
98 | 118 |
} |
99 | 119 |
|
100 | 120 |
public String getNamespace() { |
101 |
return "Analisis/Agregacion/Dissolve";
|
|
121 |
return analisisPkg + "/" + agregationPkg + "/" + geoprocessName;
|
|
102 | 122 |
} |
103 | 123 |
|
104 | 124 |
public String toString(){ |
105 |
return "Dissolve";
|
|
125 |
return geoprocessName;
|
|
106 | 126 |
} |
107 | 127 |
|
108 | 128 |
} |
Also available in: Unified diff