AccessibleSelection interface provides the standard mechanism
for an assistive technology to determine what the current selected children
are, as well as modify the selection set. Any object that has children that
can be selected should support the AccessibleSelection interface.
Applications can determine if an object supports the
AccessibleSelection interface by first obtaining its
AccessibleContext (see Accessible) and then calling the
AccessibleContext#getAccessibleSelection method. If the return value
is not null, the object supports this interface.
Accessible, Accessible#getAccessibleContext, AccessibleContext, AccessibleContext#getAccessibleSelection
| Modifier and Type | Method and Description |
|---|---|
| public void | addAccessibleSelection(int
the zero-based index of the child i)Adds the specified |
| public void | clearAccessibleSelection()
Clears the selection in the object, so that no children in the object are selected. |
| public Accessible | Returns: the i-th selected childthe zero-based index of selected children i)Returns an |
| public int | Returns: the number of items currently selectedReturns the number of |
| public boolean | Returns: true if the current child of this object is selected;
else falsethe zero-based index of the child in this i)Accessible
objectDetermines if the current child of this object is selected. |
| public void | removeAccessibleSelection(int
the zero-based index of the child i)Removes the specified child of the object from the object's selection. |
| public void | selectAllAccessibleSelection()
Causes every child of the object to be selected if the object supports multiple selections. |
| addAccessibleSelection | back to summary |
|---|---|
| public void addAccessibleSelection(int i) Adds the specified
| |
| clearAccessibleSelection | back to summary |
|---|---|
| public void clearAccessibleSelection() Clears the selection in the object, so that no children in the object are selected. | |
| getAccessibleSelection | back to summary |
|---|---|
| public Accessible getAccessibleSelection(int i) Returns an Note that the index represents the i-th selected child, which is different from the i-th child.
| |
| getAccessibleSelectionCount | back to summary |
|---|---|
| public int getAccessibleSelectionCount() Returns the number of
| |
| isAccessibleChildSelected | back to summary |
|---|---|
| public boolean isAccessibleChildSelected(int i) Determines if the current child of this object is selected.
| |
| removeAccessibleSelection | back to summary |
|---|---|
| public void removeAccessibleSelection(int i) Removes the specified child of the object from the object's selection. If the specified item isn't currently selected, this method has no effect.
| |
| selectAllAccessibleSelection | back to summary |
|---|---|
| public void selectAllAccessibleSelection() Causes every child of the object to be selected if the object supports multiple selections. | |