[cp-patches] FYI: BasicRadioButtonUI.paint() - minor fix

David Gilbert david.gilbert at object-refinery.com
Thu May 11 08:39:56 UTC 2006


This patch (committed) fixes an argument passed to the paintFocus() method, and 
removes the related TODO notes from the source code:

2006-05-11  David Gilbert  <david.gilbert at object-refinery.com>

	* javax/swing/plaf/basic/BasicRadioButtonUI.java
	(paint): Pass component size to paintFocus().

Regards,

Dave
-------------- next part --------------
Index: javax/swing/plaf/basic/BasicRadioButtonUI.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/plaf/basic/BasicRadioButtonUI.java,v
retrieving revision 1.16
diff -u -r1.16 BasicRadioButtonUI.java
--- javax/swing/plaf/basic/BasicRadioButtonUI.java	5 May 2006 11:56:21 -0000	1.16
+++ javax/swing/plaf/basic/BasicRadioButtonUI.java	11 May 2006 08:31:52 -0000
@@ -1,5 +1,5 @@
 /* BasicRadioButtonUI.java
-   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2006, Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -167,9 +167,8 @@
       }
     if (text != null)
       paintText(g, b, tr, text);
-    // TODO: Figure out what is the size parameter?
     if (b.hasFocus() && b.isFocusPainted() && m.isEnabled())
-      paintFocus(g, tr, null);
+      paintFocus(g, tr, c.getSize());
   }
 
   /**
@@ -177,9 +176,8 @@
    *
    * @param g the graphics context
    * @param tr the rectangle for the text label
-   * @param size the size (??)
+   * @param size the size of the <code>JRadioButton</code> component.
    */
-  // TODO: Figure out what for is the size parameter.
   protected void paintFocus(Graphics g, Rectangle tr, Dimension size)
   {
     Color focusColor = UIManager.getColor(getPropertyPrefix() + ".focus");


More information about the Classpath-patches mailing list