Index: java/awt/Checkbox.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/Checkbox.java,v retrieving revision 1.13 diff -u -3 -p -u -r1.13 Checkbox.java --- java/awt/Checkbox.java 20 Jan 2005 02:39:26 -0000 1.13 +++ java/awt/Checkbox.java 20 Jan 2005 12:14:53 -0000 @@ -95,6 +95,13 @@ private boolean state; // The list of listeners for this object. private transient ItemListener item_listeners; +/** + * This class provides accessibility support for the + * checkbox. + * + * @author Jerry Quinn (address@hidden) + * @author Andrew John Hughes (address@hidden) + */ protected class AccessibleAWTCheckbox extends AccessibleAWTComponent implements ItemListener, AccessibleAction, AccessibleValue Index: java/awt/Scrollbar.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/Scrollbar.java,v retrieving revision 1.24 diff -u -3 -p -u -r1.24 Scrollbar.java --- java/awt/Scrollbar.java 11 Jan 2005 09:50:14 -0000 1.24 +++ java/awt/Scrollbar.java 20 Jan 2005 12:14:53 -0000 @@ -55,7 +55,8 @@ import javax.accessibility.AccessibleVal * This class implements a scrollbar widget. * * @author Aaron M. Renn (address@hidden) - * @author Tom Tromey
+ * @author Tom Tromey (address@hidden) + * @author Andrew John Hughes (address@hidden) */ public class Scrollbar extends Component implements Accessible, Adjustable @@ -775,14 +776,43 @@ paramString() return next_scrollbar_number++; } - protected class AccessibleAWTScrollbar extends AccessibleAWTComponent + /** + * This class provides accessibility support for the + * scrollbar. + * + * @author Jerry Quinn (address@hidden) + * @author Andrew John Hughes (address@hidden) + */ + protected class AccessibleAWTScrollBar extends AccessibleAWTComponent implements AccessibleValue { + + /** + * Serialization constant to match JDK 1.5 + */ + private static final long serialVersionUID = -344337268523697807L; + + /** + * Returns the role of this accessible object. + * + * @return the instance ofAccessibleRole
,
+ * which describes this object.
+ * @see javax.accessibility.AccessibleRole
+ */
public AccessibleRole getAccessibleRole()
{
return AccessibleRole.SCROLL_BAR;
}
+ /**
+ * Returns the state set of this accessible object.
+ *
+ * @return a set of AccessibleState
s
+ * which represent the current state of the
+ * accessible object.
+ * @see javax.accessibility.AccessibleState
+ * @see javax.accessibility.AccessibleStateSet
+ */
public AccessibleStateSet getAccessibleStateSet()
{
AccessibleStateSet states = super.getAccessibleStateSet();
@@ -795,12 +825,28 @@ paramString()
return states;
}
+ /**
+ * Returns an implementation of the AccessibleValue
+ * 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 value as well as
+ * the context.
+ *
+ * @return the accessible value associated with this context.
+ * @see javax.accessibility.AccessibleValue
+ */
public AccessibleValue getAccessibleValue()
{
return this;
}
- /* (non-Javadoc)
+ /**
+ * Returns the current value of this accessible object.
+ * In this case, this is the same as the value for
+ * the scrollbar, wrapped in an Integer
+ * object.
+ *
+ * @return the numeric value of this scrollbar.
* @see javax.accessibility.AccessibleValue#getCurrentAccessibleValue()
*/
public Number getCurrentAccessibleValue()
@@ -808,7 +854,14 @@ paramString()
return new Integer(getValue());
}
- /* (non-Javadoc)
+ /**
+ * Sets the current value of this accessible object
+ * to that supplied. In this case, the value of the
+ * scrollbar is set, and this method always returns
+ * true.
+ *
+ * @param number the new accessible value.
+ * @return true if the value was set.
* @see javax.accessibility.AccessibleValue#setCurrentAccessibleValue(java.lang.Number)
*/
public boolean setCurrentAccessibleValue(Number number)
@@ -817,7 +870,13 @@ paramString()
return true;
}
- /* (non-Javadoc)
+ /**
+ * Returns the minimum acceptable accessible value used
+ * by this object. In this case, this is the same as
+ * the minimum value of the scrollbar, wrapped in an
+ * object.
+ *
+ * @return the minimum value of this scrollbar.
* @see javax.accessibility.AccessibleValue#getMinimumAccessibleValue()
*/
public Number getMinimumAccessibleValue()
@@ -825,7 +884,13 @@ paramString()
return new Integer(getMinimum());
}
- /* (non-Javadoc)
+ /**
+ * Returns the maximum acceptable accessible value used
+ * by this object. In this case, this is the same as
+ * the maximum value of the scrollbar, wrapped in an
+ * object.
+ *
+ * @return the maximum value of this scrollbar.
* @see javax.accessibility.AccessibleValue#getMaximumAccessibleValue()
*/
public Number getMaximumAccessibleValue()
@@ -844,7 +909,7 @@ paramString()
{
/* Create the context if this is the first request */
if (accessibleContext == null)
- accessibleContext = new AccessibleAWTScrollbar();
+ accessibleContext = new AccessibleAWTScrollBar();
return accessibleContext;
}