Revision 38564 branches/v2_0_0_prep/extensions/org.gvsig.selectiontools.app/org.gvsig.selectiontools.app.extension/src/main/java/org/gvsig/selectiontools/app/extension/tools/PolyLineSelectionListener.java

View differences:

PolyLineSelectionListener.java
29 29

  
30 30
import javax.swing.ImageIcon;
31 31

  
32
import org.gvsig.andami.IconThemeHelper;
32 33
import org.gvsig.andami.PluginServices;
33 34
import org.gvsig.andami.messages.NotificationManager;
34 35
import org.gvsig.fmap.dal.feature.FeatureSelection;
......
67 68
    /**
68 69
     * The image to display when the cursor is active.
69 70
     */
70
    private final Image img = new ImageIcon(this.getClass()
71
        .getClassLoader()
72
        .getResource("images/polyline-cursor-icon.png")).getImage();
71
//    private final Image img = PluginServices.getIconTheme().get("cursor-select-by-polygon").getImage();
73 72

  
74 73
    /**
75 74
     * The cursor used to work with this tool listener.
76 75
     * 
77 76
     * @see #getCursor()
78 77
     */
79
    private Cursor cur = Toolkit.getDefaultToolkit().createCustomCursor(img,
80
        new Point(16, 16),
81
        "");
78
    private Cursor cur = null;
82 79

  
83 80
    /**
84 81
     * Reference to the <code>MapControl</code> object that uses.
......
103 100
     * @see com.iver.cit.gvsig.fmap.tools.Listeners.ToolListener#getCursor()
104 101
     */
105 102
    public Cursor getCursor() {
103
    	if( cur == null ) {
104
    		cur = Toolkit.getDefaultToolkit().createCustomCursor(this.getImageCursor(),
105
    		        new Point(16, 16),
106
    		        "");
107
    	}
106 108
        return cur;
107 109
    }
108 110

  
......
191 193
    }
192 194

  
193 195
    public Image getImageCursor() {
194
        return img;
196
        return IconThemeHelper.getImage("cursor-select-by-polyline");
195 197
    }
196 198
}

Also available in: Unified diff