CheckboxMenuItem.AccessibleAWTCheckboxMenuItem
, JComboBox.AccessibleJComboBox
, JList.AccessibleJList
, JMenu.AccessibleJMenu
, JMenuBar.AccessibleJMenuBar
, JTabbedPane.AccessibleJTabbedPane
, JTable.AccessibleJTable
, JTree.AccessibleJTree
, JTree.AccessibleJTree.AccessibleJTreeNode
, List.AccessibleAWTList
, Menu.AccessibleAWTMenu
, MenuBar.AccessibleAWTMenuBar
, MenuComponent.AccessibleAWTMenuComponent
, MenuItem.AccessibleAWTMenuItem
, PopupMenu.AccessibleAWTPopupMenu
public interface AccessibleSelection
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.Modifier and Type | Method | Description |
---|---|---|
void |
addAccessibleSelection |
Adds the specified Accessible child of the object to the object's selection. |
void |
clearAccessibleSelection() |
Clears the selection in the object, so that no children in the object are selected. |
Accessible |
getAccessibleSelection |
Returns an Accessible representing the specified selected child of the object. |
int |
getAccessibleSelectionCount() |
Returns the number of Accessible children currently selected. |
boolean |
isAccessibleChildSelected |
Determines if the current child of this object is selected. |
void |
removeAccessibleSelection |
Removes the specified child of the object from the object's selection. |
void |
selectAllAccessibleSelection() |
Causes every child of the object to be selected if the object supports multiple selections. |
int getAccessibleSelectionCount()
Accessible
children currently selected. If no children are selected, the return value will be 0.Accessible getAccessibleSelection(int i)
Accessible
representing the specified selected child of the object. If there isn't a selection, or there are fewer children selected than the integer passed in, the return value will be null
. Note that the index represents the i-th selected child, which is different from the i-th child.
i
- the zero-based index of selected childrenboolean isAccessibleChildSelected(int i)
i
- the zero-based index of the child in this Accessible
objecttrue
if the current child of this object is selected; else false
void addAccessibleSelection(int i)
Accessible
child of the object to the object's selection. If the object supports multiple selections, the specified child is added to any existing selection, otherwise it replaces any existing selection in the object. If the specified child is already selected, this method has no effect.i
- the zero-based index of the childvoid removeAccessibleSelection(int i)
i
- the zero-based index of the childvoid clearAccessibleSelection()
void selectAllAccessibleSelection()
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/accessibility/AccessibleSelection.html