This patch (committed) reimplements the paramString() method to provide better debugging information. I also added a couple of API doc comments to methods that needed them:

2006-04-18  David Gilbert  <[EMAIL PROTECTED]>

        * javax/swing/JComboBox.java
        (paramStr): Reimplemented,
        (getAccessibleContext): Added API docs,
        (AccessibleJComboBox.getAccessibleRole): Likewise.

Regards,

Dave
Index: javax/swing/JComboBox.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/JComboBox.java,v
retrieving revision 1.29
diff -u -r1.29 JComboBox.java
--- javax/swing/JComboBox.java  14 Apr 2006 14:56:24 -0000      1.29
+++ javax/swing/JComboBox.java  18 Apr 2006 15:59:59 -0000
@@ -1,5 +1,5 @@
 /* JComboBox.java --
-   Copyright (C) 2002, 2004, 2005  Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2005, 2006,  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -1102,15 +1102,33 @@
   }
 
   /**
-   * A string that describes this JComboBox. Normally only used for debugging.
+   * Returns an implementation-dependent string describing the attributes of
+   * this <code>JComboBox</code>.
    *
-   * @return A string describing this JComboBox
+   * @return A string describing the attributes of this <code>JComboBox</code>
+   *         (never <code>null</code>).
    */
   protected String paramString()
   {
-    return "JComboBox";
+    String superParamStr = super.paramString();
+    StringBuffer sb = new StringBuffer();
+    sb.append(",isEditable=").append(isEditable());
+    sb.append(",lightWeightPopupEnabled=").append(isLightWeightPopupEnabled());
+    sb.append(",maximumRowCount=").append(getMaximumRowCount());
+    
+    sb.append(",selectedItemReminder=");
+    if (selectedItemReminder != null)
+      sb.append(selectedItemReminder);
+    return superParamStr + sb.toString();
   }
 
+  /**
+   * Returns the object that provides accessibility features for this
+   * <code>JComboBox</code> component.
+   *
+   * @return The accessible context (an instance of 
+   *         [EMAIL PROTECTED] AccessibleJComboBox}).
+   */
   public AccessibleContext getAccessibleContext()
   {
     if (accessibleContext == null)
@@ -1258,6 +1276,11 @@
       return false;
     }
 
+    /**
+     * Returns the accessible role for the <code>JComboBox</code> component.
+     *
+     * @return [EMAIL PROTECTED] AccessibleRole#COMBO_BOX}.
+     */
     public AccessibleRole getAccessibleRole()
     {
       return AccessibleRole.COMBO_BOX;

Reply via email to