classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: Another icons fixlet


From: Mark Wielaard
Subject: [cp-patches] FYI: Another icons fixlet
Date: Fri, 15 Jul 2005 13:41:57 +0200

Hi,

The icons weren't actually included in the distribution since our
dist-hook removes everything from standard.omit at the last moment.
The following fixes that and adds the icons to our GNULookAndFeel in the
examples. I felt that after all the build troubles we should at least
use them. (The BasicLookAndFeel doesn't support icons and the
MetalLookAndFeel now uses the MetalIconFactory.)

2005-07-15  Mark Wielaard  <address@hidden>

   * lib/standard.omit: Only list gnu/javax/swing/plaf/gtk/.*java and
   README explicitly, not the icons.
   * examples/gnu/classpath/examples/swing/GNULookAndFeel.java
   (getDefaults): Add Tree closed, leaf and open icons.

Note that this is not 100% correct since in lib/Makefile.am we are not
actually using the regexs in standard.omit, but just grep for the
directories to remove. That means that we do actually end up with
the .java files in the dist tar ball, but they will still not be
compiled.

Cheers,

Mark
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/
? lib/META-INF
Index: examples/gnu/classpath/examples/swing/GNULookAndFeel.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/examples/gnu/classpath/examples/swing/GNULookAndFeel.java,v
retrieving revision 1.2
diff -u -r1.2 GNULookAndFeel.java
--- examples/gnu/classpath/examples/swing/GNULookAndFeel.java   2 Jul 2005 
20:32:08 -0000       1.2
+++ examples/gnu/classpath/examples/swing/GNULookAndFeel.java   15 Jul 2005 
11:11:40 -0000
@@ -23,8 +23,10 @@
 
 import java.awt.Color;
 
+import javax.swing.ImageIcon;
 import javax.swing.UIDefaults;
 import javax.swing.plaf.ColorUIResource;
+import javax.swing.plaf.IconUIResource;
 import javax.swing.plaf.basic.BasicLookAndFeel;
 
 public class GNULookAndFeel extends BasicLookAndFeel
@@ -40,6 +42,8 @@
 
   static UIDefaults LAF_defaults;
 
+  private final static String iconspath = "/gnu/javax/swing/plaf/gtk/icons/";
+
   public UIDefaults getDefaults()
   {
     if (LAF_defaults == null)
@@ -59,7 +63,20 @@
           "Menu.background", new ColorUIResource(blueGray),
           "MenuBar.background", new ColorUIResource(blueGray),
           "MenuItem.background", new ColorUIResource(blueGray),
-          "ScrollBar.background", new ColorUIResource(blueGray)
+          "ScrollBar.background", new ColorUIResource(blueGray),
+
+         "Tree.closedIcon",
+         new IconUIResource(new ImageIcon
+                            (getClass().getResource
+                             (iconspath + "TreeClosed.png"))),
+         "Tree.leafIcon",
+         new IconUIResource(new ImageIcon
+                            (getClass().getResource
+                             (iconspath + "TreeLeaf.png"))),
+         "Tree.openIcon",
+         new IconUIResource(new ImageIcon
+                            (getClass().getResource
+                             (iconspath + "TreeOpen.png"))),
         };
         LAF_defaults.putDefaults(myDefaults);
       }
Index: lib/standard.omit
===================================================================
RCS file: /cvsroot/classpath/classpath/lib/standard.omit,v
retrieving revision 1.40
diff -u -r1.40 standard.omit
--- lib/standard.omit   14 Jun 2005 09:18:13 -0000      1.40
+++ lib/standard.omit   15 Jul 2005 11:11:40 -0000
@@ -1,3 +1,4 @@
 ../gnu/test/.*$
-../gnu/javax/swing/plaf/gtk/.*$
+../gnu/javax/swing/plaf/gtk/.*java$
+../gnu/javax/swing/plaf/gtk/README$
 ../gnu/classpath/jdwp/.*$

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]