This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gui][PATCH] Return SystemColors by default
- From: Thomas Fitzsimmons <fitzsim at redhat dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Fri, 28 May 2004 00:14:16 -0400
- Subject: [gui][PATCH] Return SystemColors by default
Hi,
I committed this patch to java-gui-branch. It returns appropriate
SystemColors from Component.getBackground and Component.getForeground
when no other colours are set.
Tom
2004-05-27 Thomas Fitzsimmons <fitzsim@redhat.com>
* java/awt/Component.java (getForeground): Return SystemColor if
parent is null.
(getBackground): Likewise.
Index: java/awt/Component.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/Component.java,v
retrieving revision 1.37.2.10
diff -u -r1.37.2.10 Component.java
--- java/awt/Component.java 27 May 2004 18:40:17 -0000 1.37.2.10
+++ java/awt/Component.java 28 May 2004 04:04:47 -0000
@@ -940,7 +940,7 @@
{
if (foreground != null)
return foreground;
- return parent == null ? null : parent.getForeground();
+ return parent == null ? SystemColor.windowText : parent.getForeground();
}
/**
@@ -981,7 +981,7 @@
{
if (background != null)
return background;
- return parent == null ? null : parent.getBackground();
+ return parent == null ? SystemColor.window : parent.getBackground();
}
/**