Revision 38564 branches/v2_0_0_prep/extensions/extEditing/src/org/gvsig/editing/InsertPolyLineExtension.java
InsertPolyLineExtension.java | ||
---|---|---|
40 | 40 |
*/ |
41 | 41 |
package org.gvsig.editing; |
42 | 42 |
|
43 |
import org.gvsig.andami.IconThemeHelper; |
|
43 | 44 |
import org.gvsig.andami.PluginServices; |
44 | 45 |
import org.gvsig.andami.messages.NotificationManager; |
45 | 46 |
import org.gvsig.andami.plugins.Extension; |
... | ... | |
76 | 77 |
} |
77 | 78 |
|
78 | 79 |
private void registerIcons(){ |
79 |
PluginServices.getIconTheme().registerDefault( |
|
80 |
"edition-insert-geometry-polyline", |
|
81 |
this.getClass().getClassLoader().getResource("images/Line.png") |
|
82 |
); |
|
83 |
|
|
84 |
PluginServices.getIconTheme().registerDefault( |
|
85 |
"edition-insert-geometry-spline", |
|
86 |
this.getClass().getClassLoader().getResource("images/Spline.png") |
|
87 |
); |
|
80 |
IconThemeHelper.registerIcon("action", "layer-insert-polyline", this); |
|
81 |
IconThemeHelper.registerIcon("action", "layer-insert-spline", this); |
|
88 | 82 |
} |
89 | 83 |
/** |
90 | 84 |
* @see org.gvsig.andami.plugins.IExtension#execute(java.lang.String) |
91 | 85 |
*/ |
92 | 86 |
public void execute(String s) { |
93 | 87 |
CADExtension.initFocus(); |
94 |
if (s.equals("_polyline")) {
|
|
88 |
if ("layer-insert-polyline".equalsIgnoreCase(s)) {
|
|
95 | 89 |
CADExtension.setCADTool("_polyline",true); |
96 |
}else if (s.equals("_spline")) {
|
|
90 |
}else if ("layer-insert-spline".equalsIgnoreCase(s) ) {
|
|
97 | 91 |
CADExtension.setCADTool("_spline",true); |
98 | 92 |
} |
99 | 93 |
CADExtension.getEditionManager().setMapControl(mapControl); |
Also available in: Unified diff