Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
protected class JMenu.AccessibleJMenu
extends JMenuItem.AccessibleJMenuItem
implements AccessibleSelection
JMenu
.
Nested Class Summary |
Nested classes/interfaces inherited from class javax.swing.JComponent.AccessibleJComponent | |
JComponent.AccessibleJComponent.AccessibleContainerHandler , JComponent.AccessibleJComponent.AccessibleFocusHandler |
Nested classes/interfaces inherited from class java.awt.Container.AccessibleAWTContainer | |
Container.AccessibleAWTContainer.AccessibleContainerHandler |
Nested classes/interfaces inherited from class java.awt.Component.AccessibleAWTComponent | |
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler , Component.AccessibleAWTComponent.AccessibleAWTFocusHandler |
Field Summary |
Fields inherited from class javax.swing.JComponent.AccessibleJComponent | |
accessibleContainerHandler , accessibleFocusHandler |
Fields inherited from class java.awt.Container.AccessibleAWTContainer | |
accessibleContainerHandler |
Fields inherited from class java.awt.Component.AccessibleAWTComponent | |
accessibleAWTComponentHandler , accessibleAWTFocusHandler |
Fields inherited from interface javax.accessibility.AccessibleAction | |
CLICK , DECREMENT , INCREMENT , TOGGLE_EXPAND , TOGGLE_POPUP |
Fields inherited from interface javax.accessibility.AccessibleText | |
CHARACTER , SENTENCE , WORD |
Constructor Summary | |
|
Method Summary | |
void |
|
void |
|
Accessible |
|
int |
|
AccessibleRole |
|
AccessibleSelection |
|
Accessible |
|
int |
|
boolean |
|
void |
|
void |
|
Methods inherited from class javax.swing.JMenuItem.AccessibleJMenuItem | |
getAccessibleRole , stateChanged |
Methods inherited from class java.awt.Container.AccessibleAWTContainer | |
getAccessibleAt , getAccessibleChild , getAccessibleChildrenCount |
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
public void addAccessibleSelection(int index)
Selects the accessible child with the specified index.
- Specified by:
- addAccessibleSelection in interface AccessibleSelection
- Parameters:
index
- the index of the accessible child to select
public void clearAccessibleSelection()
Removes all possibly selected accessible children of this object from the selection.
- Specified by:
- clearAccessibleSelection in interface AccessibleSelection
public Accessible getAccessibleChild(int index)
Returns the accessible child with the specifiedindex
.
- Overrides:
- getAccessibleChild in interface JComponent.AccessibleJComponent
- Parameters:
index
- the index of the child to fetch
- Returns:
- the accessible child with the specified
index
public int getAccessibleChildrenCount()
Returns the number of accessible children of this object.
- Overrides:
- getAccessibleChildrenCount in interface JComponent.AccessibleJComponent
- Returns:
- the number of accessible children of this object
public AccessibleRole getAccessibleRole()
Returns the accessible role of this object, which isAccessibleRole.MENU
for the AccessibleJMenu.
- Overrides:
- getAccessibleRole in interface JMenuItem.AccessibleJMenuItem
- Returns:
- the accessible role of this object
public AccessibleSelection getAccessibleSelection()
Returns the accessible selection of this object. AccessibleJMenus handle their selection themselves, so we always returnthis
here.
- Overrides:
- getAccessibleSelection in interface AccessibleContext
- Returns:
- the accessible selection of this object
public Accessible getAccessibleSelection(int index)
Returns the selected accessible child with the specifiedindex
.
- Specified by:
- getAccessibleSelection in interface AccessibleSelection
- Parameters:
index
- the index of the accessible selected child to return
- Returns:
- the selected accessible child with the specified
index
public int getAccessibleSelectionCount()
Returns the number of selected accessible children. This will be0
if no item is selected, or1
if an item is selected. AccessibleJMenu can have maximum 1 selected item.
- Specified by:
- getAccessibleSelectionCount in interface AccessibleSelection
- Returns:
- the number of selected accessible children
public boolean isAccessibleChildSelected(int index)
Returnstrue
if the accessible child with the specified index is selected,false
otherwise.
- Specified by:
- isAccessibleChildSelected in interface AccessibleSelection
- Parameters:
index
- the index of the accessible child to check
- Returns:
true
if the accessible child with the specified index is selected,false
otherwise
public void removeAccessibleSelection(int index)
Removes the item with the specified index from the selection.
- Specified by:
- removeAccessibleSelection in interface AccessibleSelection
- Parameters:
index
- the index of the selected item to remove from the selection
public void selectAllAccessibleSelection()
AccessibleJMenu don't support multiple selection, so this method does nothing.
- Specified by:
- selectAllAccessibleSelection in interface AccessibleSelection