-
- All Known Implementing Classes:
- 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
This 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 (seeAccessible
) and then calling theAccessibleContext.getAccessibleSelection()
method. If the return value is not null, the object supports this interface.
-
-
Method Summary
Methods Modifier and Type Method and Description void
addAccessibleSelection(int i)
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(int i)
Returns an Accessible representing the specified selected child of the object.int
getAccessibleSelectionCount()
Returns the number of Accessible children currently selected.boolean
isAccessibleChildSelected(int i)
Determines if the current child of this object is selected.void
removeAccessibleSelection(int i)
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.
-
-
-
Method Detail
-
getAccessibleSelectionCount
int getAccessibleSelectionCount()
Returns the number of Accessible children currently selected. If no children are selected, the return value will be 0.- Returns:
- the number of items currently selected.
-
getAccessibleSelection
Accessible getAccessibleSelection(int i)
Returns an 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.
- Parameters:
i
- the zero-based index of selected children- Returns:
- the i-th selected child
- See Also:
getAccessibleSelectionCount()
-
isAccessibleChildSelected
boolean isAccessibleChildSelected(int i)
Determines if the current child of this object is selected.- Parameters:
i
- the zero-based index of the child in this Accessible object.- Returns:
- true if the current child of this object is selected; else false.
- See Also:
AccessibleContext.getAccessibleChild(int)
-
addAccessibleSelection
void addAccessibleSelection(int i)
Adds the specified 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.- Parameters:
i
- the zero-based index of the child- See Also:
AccessibleContext.getAccessibleChild(int)
-
removeAccessibleSelection
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.- Parameters:
i
- the zero-based index of the child- See Also:
AccessibleContext.getAccessibleChild(int)
-
clearAccessibleSelection
void clearAccessibleSelection()
Clears the selection in the object, so that no children in the object are selected.
-
selectAllAccessibleSelection
void selectAllAccessibleSelection()
Causes every child of the object to be selected if the object supports multiple selections.
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
21/11/2024 21:28:36 Cette version de la page est en cache (à la date du 21/11/2024 21:28:36) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.Document créé le 31/08/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/accessibility/accessibleselection.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.