-
Bug
-
Resolution: Fixed
-
P4
-
1.3.0, 5.0
-
b28
-
generic, sparc
-
generic, solaris_2.5.1
-
Verified
Name: aaC67449 Date: 07/23/99
the List.AccessibleAWTList.getAccessibleSelection(int) method always returns
null, but should return "an Accessible containing the selected item"
javadoc says:"
public Accessible getAccessibleSelection(int i)
Returns an Accessible representing the specified selected item in the object. If there
isn't a selection, or there are fewer items selected than the integer passed in, the
return value will be null.
Specified by:
getAccessibleSelection in interface AccessibleSelection
Parameters:
i - the zero-based index of selected items
Returns:
an Accessible containing the selected item
"
See example.
------------- example --------------
import java.awt.List;
import javax.accessibility.AccessibleSelection;
public class Test {
public static void main(String argv[]) {
List o = new List(10);
AccessibleSelection c =
o.getAccessibleContext().getAccessibleSelection();
for (int i = 0; i < 10; i++) {
o.add("Test" + i);
}
o.select(4);
System.out.println("getAccessibleSelection:"
+ c.getAccessibleSelection(0));
}
}
------------- JDK1.3L output ---------------
Warning: JIT compiler "sunwjit" not found. Will use interpreter.
null
======================================================================