Index: java/awt/Checkbox.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/Checkbox.java,v retrieving revision 1.14 diff -u -3 -p -u -r1.14 Checkbox.java --- java/awt/Checkbox.java 20 Jan 2005 12:54:54 -0000 1.14 +++ java/awt/Checkbox.java 22 Jan 2005 01:32:34 -0000 @@ -113,6 +113,16 @@ protected class AccessibleAWTCheckbox 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: java/awt/Choice.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/Choice.java,v retrieving revision 1.19 diff -u -3 -p -u -r1.19 Choice.java --- java/awt/Choice.java 30 Dec 2004 19:02:06 -0000 1.19 +++ java/awt/Choice.java 22 Jan 2005 01:32:34 -0000 @@ -85,23 +85,65 @@ private int selectedIndex = -1; // Listener chain private ItemListener item_listeners; +/** + * This class provides accessibility support for the + * combo box. + * + * @author Jerry Quinn (address@hidden) + * @author Andrew John Hughes (address@hidden) + */ 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 AccessibleAction + * 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 AccessibleRole, + * 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 @@ private ItemListener item_listeners; 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 String used to describe the choice. * @see javax.accessibility.AccessibleAction#getAccessibleActionDescription(int) */ public String getAccessibleActionDescription(int i) @@ -117,7 +166,13 @@ private ItemListener item_listeners; 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)