[kaffe] CVS kaffe (robilad): resynced with gnu classpath: accessibility fixes

Kaffe CVS cvs-commits at kaffe.org
Sat Jan 22 13:31:56 PST 2005


PatchSet 5907 
Date: 2005/01/22 19:20:51
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
resynced with gnu classpath: accessibility fixes

2005-01-22  Dalibor Topic  <robilad at kaffe.org>

Resynced with GNU Classpath.

2005-01-22  Andrew John Hughes  <gnu_andrew at member.fsf.org>

* java/awt/Checkbox.java:
(AccessibleAWTCheckbox()): Added public constructor
to call superclass.
* java/awt/Choice.java:
(AccessibleAWTChoice): Added class documentation.
(AccessibleAWTChoice()): Added public constructor
to call superclass.
(AccessibleAWTChoice.getAccessibleAction()): Documented.
(AccessibleAWTChoice.getAccessibleRole()): Documented,
and changed role to COMBO_BOX.
(AccessibleAWTChoice.getAccessibleActionCount()): Documented.
(AccessibleAWTChoice.getAccessibleActionDescription(int)): Documented.
(AccessibleAWTChoice.doAccessibleAction(int)): Documented.

Members: 
	libraries/javalib/java/awt/Checkbox.java:1.6->1.7 
	libraries/javalib/java/awt/Choice.java:1.6->1.7 
	ChangeLog:1.3446->1.3447 

Index: kaffe/libraries/javalib/java/awt/Checkbox.java
diff -u kaffe/libraries/javalib/java/awt/Checkbox.java:1.6 kaffe/libraries/javalib/java/awt/Checkbox.java:1.7
--- kaffe/libraries/javalib/java/awt/Checkbox.java:1.6	Sat Jan 22 18:58:23 2005
+++ kaffe/libraries/javalib/java/awt/Checkbox.java	Sat Jan 22 19:20:51 2005
@@ -113,6 +113,16 @@
   private static final long serialVersionUID = 7881579233144754107L;
 
   /**
+   * Default constructor which simply calls the
+   * super class for generic component accessibility
+   * handling.
+   */
+  public AccessibleAWTCheckbox()
+  {
+    super();
+  }
+
+  /**
    * Captures changes to the state of the checkbox and
    * fires appropriate accessible property change events.
    *
Index: kaffe/libraries/javalib/java/awt/Choice.java
diff -u kaffe/libraries/javalib/java/awt/Choice.java:1.6 kaffe/libraries/javalib/java/awt/Choice.java:1.7
--- kaffe/libraries/javalib/java/awt/Choice.java:1.6	Thu Jan  6 00:22:46 2005
+++ kaffe/libraries/javalib/java/awt/Choice.java	Sat Jan 22 19:20:51 2005
@@ -85,23 +85,65 @@
 // Listener chain
 private ItemListener item_listeners;
 
+/**
+ * This class provides accessibility support for the
+ * combo box.
+ *
+ * @author Jerry Quinn  (jlquinn at optonline.net)
+ * @author Andrew John Hughes (gnu_andrew at member.fsf.org)
+ */
   protected class AccessibleAWTChoice
-    extends Component.AccessibleAWTComponent
-    implements AccessibleAction
+  extends AccessibleAWTComponent
+  implements AccessibleAction
   {
+
+    /**
+     * Serialization constant to match JDK 1.5
+     */
+    private static final long serialVersionUID = 7175603582428509322L;
+
+    /**
+     * Default constructor which simply calls the
+     * super class for generic component accessibility
+     * handling.
+     */
+    public AccessibleAWTChoice()
+    {
+      super();
+    }
+
+    /**
+     * Returns an implementation of the <code>AccessibleAction</code>
+     * interface for this accessible object.  In this case, the
+     * current instance is simply returned (with a more appropriate
+     * type), as it also implements the accessible action as well as
+     * the context.
+     *
+     * @return the accessible action associated with this context.
+     * @see javax.accessibility.AccessibleAction
+     */
     public AccessibleAction getAccessibleAction()
     {
       return this;
     }
 
-    // FIXME: I think this is right, but should be checked by someone who
-    // knows better.
+    /**
+     * Returns the role of this accessible object.
+     *
+     * @return the instance of <code>AccessibleRole</code>,
+     *         which describes this object.
+     * @see javax.accessibility.AccessibleRole
+     */
     public AccessibleRole getAccessibleRole()
     {
-      return AccessibleRole.POPUP_MENU;
+      return AccessibleRole.COMBO_BOX;
     }
 	  
-    /* (non-Javadoc)
+    /**
+     * Returns the number of actions associated with this accessible
+     * object.  In this case, it is the number of choices available.
+     *
+     * @return the number of choices available.
      * @see javax.accessibility.AccessibleAction#getAccessibleActionCount()
      */
     public int getAccessibleActionCount()
@@ -109,7 +151,14 @@
       return pItems.size();
     }
 
-    /* (non-Javadoc)
+    /**
+     * Returns a description of the action with the supplied id.
+     * In this case, it is the text used in displaying the particular
+     * choice on-screen.
+     *
+     * @param i the id of the choice whose description should be
+     *          retrieved.
+     * @return the <code>String</code> used to describe the choice.
      * @see javax.accessibility.AccessibleAction#getAccessibleActionDescription(int)
      */
     public String getAccessibleActionDescription(int i)
@@ -117,7 +166,13 @@
       return (String) pItems.get(i);
     }
 	  
-    /* (non-Javadoc)
+    /**
+     * Executes the action with the specified id.  In this case,
+     * calling this method provides the same behaviour as would
+     * choosing a choice from the list in a visual manner.
+     *
+     * @param i the id of the choice to select.
+     * @return true if a valid choice was specified.
      * @see javax.accessibility.AccessibleAction#doAccessibleAction(int)
      */
     public boolean doAccessibleAction(int i)
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3446 kaffe/ChangeLog:1.3447
--- kaffe/ChangeLog:1.3446	Sat Jan 22 19:18:44 2005
+++ kaffe/ChangeLog	Sat Jan 22 19:20:47 2005
@@ -2,6 +2,26 @@
 
 	Resynced with GNU Classpath.
 	
+	2005-01-22  Andrew John Hughes  <gnu_andrew at member.fsf.org>
+
+	* java/awt/Checkbox.java:
+	(AccessibleAWTCheckbox()): Added public constructor
+	to call superclass.
+	* java/awt/Choice.java:
+	(AccessibleAWTChoice): Added class documentation.
+	(AccessibleAWTChoice()): Added public constructor
+	to call superclass.
+	(AccessibleAWTChoice.getAccessibleAction()): Documented.
+	(AccessibleAWTChoice.getAccessibleRole()): Documented,
+	and changed role to COMBO_BOX.
+	(AccessibleAWTChoice.getAccessibleActionCount()): Documented.
+	(AccessibleAWTChoice.getAccessibleActionDescription(int)): Documented.
+	(AccessibleAWTChoice.doAccessibleAction(int)): Documented.
+
+2005-01-22  Dalibor Topic  <robilad at kaffe.org>
+
+	Resynced with GNU Classpath.
+	
 	2005-01-21  Andrew John Hughes  <gnu_andrew at member.fsf.org>
 
 	* java/text/SimpleDateFormat.java:



More information about the kaffe mailing list