javax.accessibility
Interface AccessibleSelection

All Known Implementing Classes:
CheckboxMenuItem.AccessibleAWTCheckboxMenuItem sample code for java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem definition code for java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem , JComboBox.AccessibleJComboBox sample code for javax.swing.JComboBox.AccessibleJComboBox definition code for javax.swing.JComboBox.AccessibleJComboBox , JList.AccessibleJList sample code for javax.swing.JList.AccessibleJList definition code for javax.swing.JList.AccessibleJList , JMenu.AccessibleJMenu sample code for javax.swing.JMenu.AccessibleJMenu definition code for javax.swing.JMenu.AccessibleJMenu , JMenuBar.AccessibleJMenuBar sample code for javax.swing.JMenuBar.AccessibleJMenuBar definition code for javax.swing.JMenuBar.AccessibleJMenuBar , JTabbedPane.AccessibleJTabbedPane sample code for javax.swing.JTabbedPane.AccessibleJTabbedPane definition code for javax.swing.JTabbedPane.AccessibleJTabbedPane , JTable.AccessibleJTable sample code for javax.swing.JTable.AccessibleJTable definition code for javax.swing.JTable.AccessibleJTable , JTree.AccessibleJTree sample code for javax.swing.JTree.AccessibleJTree definition code for javax.swing.JTree.AccessibleJTree , JTree.AccessibleJTree.AccessibleJTreeNode sample code for javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode definition code for javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode , List.AccessibleAWTList sample code for java.awt.List.AccessibleAWTList definition code for java.awt.List.AccessibleAWTList , Menu.AccessibleAWTMenu sample code for java.awt.Menu.AccessibleAWTMenu definition code for java.awt.Menu.AccessibleAWTMenu , MenuBar.AccessibleAWTMenuBar sample code for java.awt.MenuBar.AccessibleAWTMenuBar definition code for java.awt.MenuBar.AccessibleAWTMenuBar , MenuComponent.AccessibleAWTMenuComponent sample code for java.awt.MenuComponent.AccessibleAWTMenuComponent definition code for java.awt.MenuComponent.AccessibleAWTMenuComponent , MenuItem.AccessibleAWTMenuItem sample code for java.awt.MenuItem.AccessibleAWTMenuItem definition code for java.awt.MenuItem.AccessibleAWTMenuItem , PopupMenu.AccessibleAWTPopupMenu sample code for java.awt.PopupMenu.AccessibleAWTPopupMenu definition code for java.awt.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 (see Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible ) and then calling the AccessibleContext.getAccessibleSelection() sample code for javax.accessibility.AccessibleContext.getAccessibleSelection() definition code for javax.accessibility.AccessibleContext.getAccessibleSelection() method. If the return value is not null, the object supports this interface.

See Also:
Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible , Accessible.getAccessibleContext() sample code for javax.accessibility.Accessible.getAccessibleContext() definition code for javax.accessibility.Accessible.getAccessibleContext() , AccessibleContext sample code for javax.accessibility.AccessibleContext definition code for javax.accessibility.AccessibleContext , AccessibleContext.getAccessibleSelection() sample code for javax.accessibility.AccessibleContext.getAccessibleSelection() definition code for javax.accessibility.AccessibleContext.getAccessibleSelection()

Method Summary
 void addAccessibleSelection sample code for javax.accessibility.AccessibleSelection.addAccessibleSelection(int) definition code for javax.accessibility.AccessibleSelection.addAccessibleSelection(int) (int i)
          Adds the specified Accessible child of the object to the object's selection.
 void clearAccessibleSelection sample code for javax.accessibility.AccessibleSelection.clearAccessibleSelection() definition code for javax.accessibility.AccessibleSelection.clearAccessibleSelection() ()
          Clears the selection in the object, so that no children in the object are selected.
 Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible getAccessibleSelection sample code for javax.accessibility.AccessibleSelection.getAccessibleSelection(int) definition code for javax.accessibility.AccessibleSelection.getAccessibleSelection(int) (int i)
          Returns an Accessible representing the specified selected child of the object.
 int getAccessibleSelectionCount sample code for javax.accessibility.AccessibleSelection.getAccessibleSelectionCount() definition code for javax.accessibility.AccessibleSelection.getAccessibleSelectionCount() ()
          Returns the number of Accessible children currently selected.
 boolean isAccessibleChildSelected sample code for javax.accessibility.AccessibleSelection.isAccessibleChildSelected(int) definition code for javax.accessibility.AccessibleSelection.isAccessibleChildSelected(int) (int i)
          Determines if the current child of this object is selected.
 void removeAccessibleSelection sample code for javax.accessibility.AccessibleSelection.removeAccessibleSelection(int) definition code for javax.accessibility.AccessibleSelection.removeAccessibleSelection(int) (int i)
          Removes the specified child of the object from the object's selection.
 void selectAllAccessibleSelection sample code for javax.accessibility.AccessibleSelection.selectAllAccessibleSelection() definition code for javax.accessibility.AccessibleSelection.selectAllAccessibleSelection() ()
          Causes every child of the object to be selected if the object supports multiple selections.
 

Method Detail

getAccessibleSelectionCount sample code for javax.accessibility.AccessibleSelection.getAccessibleSelectionCount() definition code for javax.accessibility.AccessibleSelection.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 sample code for javax.accessibility.AccessibleSelection.getAccessibleSelection(int) definition code for javax.accessibility.AccessibleSelection.getAccessibleSelection(int)

Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.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() sample code for javax.accessibility.AccessibleSelection.getAccessibleSelectionCount() definition code for javax.accessibility.AccessibleSelection.getAccessibleSelectionCount()

isAccessibleChildSelected sample code for javax.accessibility.AccessibleSelection.isAccessibleChildSelected(int) definition code for javax.accessibility.AccessibleSelection.isAccessibleChildSelected(int)

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) sample code for javax.accessibility.AccessibleContext.getAccessibleChild(int) definition code for javax.accessibility.AccessibleContext.getAccessibleChild(int)

addAccessibleSelection sample code for javax.accessibility.AccessibleSelection.addAccessibleSelection(int) definition code for javax.accessibility.AccessibleSelection.addAccessibleSelection(int)

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) sample code for javax.accessibility.AccessibleContext.getAccessibleChild(int) definition code for javax.accessibility.AccessibleContext.getAccessibleChild(int)

removeAccessibleSelection sample code for javax.accessibility.AccessibleSelection.removeAccessibleSelection(int) definition code for javax.accessibility.AccessibleSelection.removeAccessibleSelection(int)

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) sample code for javax.accessibility.AccessibleContext.getAccessibleChild(int) definition code for javax.accessibility.AccessibleContext.getAccessibleChild(int)

clearAccessibleSelection sample code for javax.accessibility.AccessibleSelection.clearAccessibleSelection() definition code for javax.accessibility.AccessibleSelection.clearAccessibleSelection()

void clearAccessibleSelection()
Clears the selection in the object, so that no children in the object are selected.


selectAllAccessibleSelection sample code for javax.accessibility.AccessibleSelection.selectAllAccessibleSelection() definition code for javax.accessibility.AccessibleSelection.selectAllAccessibleSelection()

void selectAllAccessibleSelection()
Causes every child of the object to be selected if the object supports multiple selections.