[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: MetalCheckBoxIcon
From: |
David Gilbert |
Subject: |
[cp-patches] FYI: MetalCheckBoxIcon |
Date: |
Fri, 16 Sep 2005 10:09:46 +0000 |
User-agent: |
Mozilla Thunderbird 1.0.6 (X11/20050728) |
I committed this patch to change the color of the check mark when the JCheckBox is
disabled:
2005-09-16 David Gilbert <address@hidden>
* javax/swing/plaf/metal/MetalCheckBoxIcon.java
(drawCheck): change color according to component state.
Regards,
Dave
Index: javax/swing/plaf/metal/MetalCheckBoxIcon.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalCheckBoxIcon.java,v
retrieving revision 1.3
diff -u -r1.3 MetalCheckBoxIcon.java
--- javax/swing/plaf/metal/MetalCheckBoxIcon.java 22 Jul 2005 08:26:47
-0000 1.3
+++ javax/swing/plaf/metal/MetalCheckBoxIcon.java 16 Sep 2005 09:05:43
-0000
@@ -38,10 +38,8 @@
package javax.swing.plaf.metal;
-import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
-
import java.io.Serializable;
import javax.swing.Icon;
@@ -79,7 +77,10 @@
*/
protected void drawCheck(Component c, Graphics g, int x, int y)
{
- g.setColor(Color.BLACK);
+ if (c.isEnabled())
+ g.setColor(MetalLookAndFeel.getBlack());
+ else
+ g.setColor(MetalLookAndFeel.getControlDisabled());
g.drawLine(3 + x, 5 + y, 3 + x, 9 + y);
g.drawLine(4 + x, 5 + y, 4 + x, 9 + y);
g.drawLine(5 + x, 7 + y, 9 + x, 3 + y);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: MetalCheckBoxIcon,
David Gilbert <=