Revision 315 org.gvsig.toolbox/trunk/org.gvsig.toolbox/org.gvsig.toolbox.gui/src/main/java/org/gvsig/toolbox/gui/ToolboxGUILibrary.java
ToolboxGUILibrary.java | ||
---|---|---|
1 | 1 |
package org.gvsig.toolbox.gui; |
2 | 2 |
|
3 |
import java.net.URL; |
|
3 | 4 |
import java.util.Locale; |
5 |
import javax.swing.ImageIcon; |
|
4 | 6 |
|
5 | 7 |
import org.gvsig.i18n.Messages; |
6 | 8 |
import org.gvsig.tools.library.AbstractLibrary; |
7 | 9 |
import org.gvsig.tools.library.Library; |
8 | 10 |
import org.gvsig.tools.library.LibraryException; |
11 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
|
12 |
import org.gvsig.tools.swing.icontheme.IconTheme; |
|
9 | 13 |
|
10 | 14 |
public class ToolboxGUILibrary extends AbstractLibrary { |
11 | 15 |
|
... | ... | |
31 | 35 |
|
32 | 36 |
@Override |
33 | 37 |
protected void doPostInitialize() throws LibraryException { |
38 |
IconTheme tm = ToolsSwingLocator.getIconThemeManager().getCurrent(); |
|
39 |
URL r0 = this.getClass().getResource("/images/layertypes/layer-type-point.png"); |
|
40 |
ImageIcon icon0 = new ImageIcon(r0); |
|
41 |
tm.registerDefault("Toolbox", "layertypes", "layer-type-point", icon0, r0); |
|
42 |
|
|
43 |
URL r1 = this.getClass().getResource("/images/layertypes/layer-type-line.png"); |
|
44 |
ImageIcon icon1 = new ImageIcon(r1); |
|
45 |
tm.registerDefault("Toolbox", "layertypes", "layer-type-line", icon1, r1); |
|
46 |
|
|
47 |
URL r2 = this.getClass().getResource("/images/layertypes/layer-type-polygon.png"); |
|
48 |
ImageIcon icon2 = new ImageIcon(r2); |
|
49 |
tm.registerDefault("Toolbox", "layertypes", "layer-type-polygon", icon2, r2); |
|
50 |
|
|
51 |
URL r0s = this.getClass().getResource("/images/layertypes/layer-type-point-sel.png"); |
|
52 |
ImageIcon icon0s = new ImageIcon(r0s); |
|
53 |
tm.registerDefault("Toolbox", "layertypes", "layer-type-point-sel", icon0s, r0s); |
|
54 |
|
|
55 |
URL r1s = this.getClass().getResource("/images/layertypes/layer-type-line-sel.png"); |
|
56 |
ImageIcon icon1s = new ImageIcon(r1s); |
|
57 |
tm.registerDefault("Toolbox", "layertypes", "layer-type-line-sel", icon1s, r1s); |
|
58 |
|
|
59 |
URL r2s = this.getClass().getResource("/images/layertypes/layer-type-polygon-sel.png"); |
|
60 |
ImageIcon icon2s = new ImageIcon(r2s); |
|
61 |
tm.registerDefault("Toolbox", "layertypes", "layer-type-polygon-sel", icon2s, r2s); |
|
62 |
|
|
63 |
URL r0m = this.getClass().getResource("/images/layertypes/layer-type-multipoint.png"); |
|
64 |
ImageIcon icon0m = new ImageIcon(r0m); |
|
65 |
tm.registerDefault("Toolbox", "layertypes", "layer-type-multipoint", icon0m, r0m); |
|
66 |
|
|
67 |
URL r1m = this.getClass().getResource("/images/layertypes/layer-type-multiline.png"); |
|
68 |
ImageIcon icon1m = new ImageIcon(r1m); |
|
69 |
tm.registerDefault("Toolbox", "layertypes", "layer-type-multiline", icon1m, r1m); |
|
70 |
|
|
71 |
URL r2m = this.getClass().getResource("/images/layertypes/layer-type-multipolygon.png"); |
|
72 |
ImageIcon icon2m = new ImageIcon(r2m); |
|
73 |
tm.registerDefault("Toolbox", "layertypes", "layer-type-multipolygon", icon2m, r2m); |
|
74 |
|
|
75 |
URL r0sm = this.getClass().getResource("/images/layertypes/layer-type-multipoint-sel.png"); |
|
76 |
ImageIcon icon0sm = new ImageIcon(r0sm); |
|
77 |
tm.registerDefault("Toolbox", "layertypes", "layer-type-multipoint-sel", icon0sm, r0sm); |
|
78 |
|
|
79 |
URL r1sm = this.getClass().getResource("/images/layertypes/layer-type-multiline-sel.png"); |
|
80 |
ImageIcon icon1sm = new ImageIcon(r1sm); |
|
81 |
tm.registerDefault("Toolbox", "layertypes", "layer-type-multiline-sel", icon1sm, r1sm); |
|
82 |
|
|
83 |
URL r2sm = this.getClass().getResource("/images/layertypes/layer-type-multipolygon-sel.png"); |
|
84 |
ImageIcon icon2sm = new ImageIcon(r2sm); |
|
85 |
tm.registerDefault("Toolbox", "layertypes", "layer-type-multipolygon-sel", icon2sm, r2sm); |
|
34 | 86 |
} |
35 | 87 |
|
36 | 88 |
} |
Also available in: Unified diff