[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: Checkbox and Component - 2nd try
From: |
Robert Schuster |
Subject: |
[cp-patches] FYI: Checkbox and Component - 2nd try |
Date: |
Mon, 19 Sep 2005 11:04:02 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.11) Gecko/20050916 |
Hi,
same patch but this time the right ChangeLog entry:
2005-09-19 Robert Schuster <address@hidden>
* java/awt/Checkbox.java:
(Checkbox): Properly set as selected checkbox in corresponding
checkbox group.
(paramString): Removed checkbox group information.
* java/awt/Component.java:
(paramString): Removed redundant "=".
cu
Robert
Index: java/awt/Checkbox.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/Checkbox.java,v
retrieving revision 1.18
diff -u -r1.18 Checkbox.java
--- java/awt/Checkbox.java 2 Jul 2005 20:32:23 -0000 1.18
+++ java/awt/Checkbox.java 19 Sep 2005 08:50:57 -0000
@@ -392,6 +392,11 @@
this.label = label;
this.state = state;
this.group = group;
+
+ if ( state && group != null )
+ {
+ group.setSelectedCheckbox(this);
+ }
}
/*************************************************************************/
@@ -610,8 +615,10 @@
protected String
paramString()
{
- return ("label=" + label + ",state=" + state + ",group=" + group
- + "," + super.paramString());
+ // Note: We cannot add the checkbox group information here because this
+ // would trigger infinite recursion when CheckboxGroup.toString() is
+ // called and the box is in its selected state.
+ return ("label=" + label + ",state=" + state + "," + super.paramString());
}
/**
Index: java/awt/Component.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/Component.java,v
retrieving revision 1.74
diff -u -r1.74 Component.java
--- java/awt/Component.java 15 Sep 2005 21:59:02 -0000 1.74
+++ java/awt/Component.java 19 Sep 2005 08:50:58 -0000
@@ -4240,9 +4240,9 @@
if (isDoubleBuffered())
param.append(",doublebuffered");
if (parent == null)
- param.append(",parent==null");
+ param.append(",parent=null");
else
- param.append(",parent==").append(parent.getName());
+ param.append(",parent=").append(parent.getName());
return param.toString();
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: Checkbox and Component - 2nd try,
Robert Schuster <=