Revision 38564 branches/v2_0_0_prep/extensions/extEditing/src/org/gvsig/editing/AutoCompletePolygonExtension.java

View differences:

AutoCompletePolygonExtension.java
1 1
package org.gvsig.editing;
2 2

  
3
import org.gvsig.andami.IconThemeHelper;
3 4
import org.gvsig.andami.PluginServices;
4 5
import org.gvsig.andami.messages.NotificationManager;
5 6
import org.gvsig.andami.plugins.Extension;
......
23 24
		registerIcons();
24 25
	}
25 26
	private void registerIcons(){
26
		PluginServices.getIconTheme().registerDefault(
27
				"edition-geometry-autocompletepolygon",
28
				this.getClass().getClassLoader().getResource("images/polygon_autocomplete.png")
29
			);
30

  
27
		IconThemeHelper.registerIcon("action", "layer-insert-autopolygon", this);
31 28
	}
32 29
	public void execute(String actionCommand) {
33 30
		CADExtension.initFocus();
34
		if (actionCommand.equals("AUTOCOMPLETE_POLYGON")) {
31
		if (actionCommand.equals("layer-insert-autopolygon")) {
35 32
			CADExtension.setCADTool("_autocompletepolygon", true);
36 33
			CADExtension.getEditionManager().setMapControl(mapControl);
37 34
		}

Also available in: Unified diff