23 |
|
|
24 |
import java.awt.Color; |
import java.awt.Color; |
25 |
|
|
26 |
|
import javax.swing.ImageIcon; |
27 |
import javax.swing.UIDefaults; |
import javax.swing.UIDefaults; |
28 |
import javax.swing.plaf.ColorUIResource; |
import javax.swing.plaf.ColorUIResource; |
29 |
|
import javax.swing.plaf.IconUIResource; |
30 |
import javax.swing.plaf.basic.BasicLookAndFeel; |
import javax.swing.plaf.basic.BasicLookAndFeel; |
31 |
|
|
32 |
public class GNULookAndFeel extends BasicLookAndFeel |
public class GNULookAndFeel extends BasicLookAndFeel |
42 |
|
|
43 |
static UIDefaults LAF_defaults; |
static UIDefaults LAF_defaults; |
44 |
|
|
45 |
|
private final static String iconspath = "/gnu/javax/swing/plaf/gtk/icons/"; |
46 |
|
|
47 |
public UIDefaults getDefaults() |
public UIDefaults getDefaults() |
48 |
{ |
{ |
49 |
if (LAF_defaults == null) |
if (LAF_defaults == null) |
63 |
"Menu.background", new ColorUIResource(blueGray), |
"Menu.background", new ColorUIResource(blueGray), |
64 |
"MenuBar.background", new ColorUIResource(blueGray), |
"MenuBar.background", new ColorUIResource(blueGray), |
65 |
"MenuItem.background", new ColorUIResource(blueGray), |
"MenuItem.background", new ColorUIResource(blueGray), |
66 |
"ScrollBar.background", new ColorUIResource(blueGray) |
"ScrollBar.background", new ColorUIResource(blueGray), |
67 |
|
|
68 |
|
"Tree.closedIcon", |
69 |
|
new IconUIResource(new ImageIcon |
70 |
|
(getClass().getResource |
71 |
|
(iconspath + "TreeClosed.png"))), |
72 |
|
"Tree.leafIcon", |
73 |
|
new IconUIResource(new ImageIcon |
74 |
|
(getClass().getResource |
75 |
|
(iconspath + "TreeLeaf.png"))), |
76 |
|
"Tree.openIcon", |
77 |
|
new IconUIResource(new ImageIcon |
78 |
|
(getClass().getResource |
79 |
|
(iconspath + "TreeOpen.png"))), |
80 |
}; |
}; |
81 |
LAF_defaults.putDefaults(myDefaults); |
LAF_defaults.putDefaults(myDefaults); |
82 |
} |
} |