/[classpath]/classpath/examples/gnu/classpath/examples/swing/GNULookAndFeel.java
ViewVC logotype

Diff of /classpath/examples/gnu/classpath/examples/swing/GNULookAndFeel.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by mark, Sat Jul 2 20:32:08 2005 UTC revision 1.3 by mark, Fri Jul 15 11:17:45 2005 UTC
# Line 23  package gnu.classpath.examples.swing; Line 23  package gnu.classpath.examples.swing;
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
# Line 40  public class GNULookAndFeel extends Basi Line 42  public class GNULookAndFeel extends Basi
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)
# Line 59  public class GNULookAndFeel extends Basi Line 63  public class GNULookAndFeel extends Basi
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        }        }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26