Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
protected class JMenuBar.AccessibleJMenuBar
extends JComponent.AccessibleJComponent
implements AccessibleSelection
JMenuBar
.
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 |
Method Summary | |
void |
|
void |
|
AccessibleRole |
|
AccessibleSelection |
|
Accessible |
|
int |
|
AccessibleStateSet |
|
boolean |
|
void |
|
void |
|
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 i)
Selects the menu with indexi
. If another menu is already selected, this will be deselected.
- Specified by:
- addAccessibleSelection in interface AccessibleSelection
- Parameters:
i
- the menu to be selected
public void clearAccessibleSelection()
Deselects all possibly selected menus.
- Specified by:
- clearAccessibleSelection in interface AccessibleSelection
public AccessibleRole getAccessibleRole()
Returns the accessible role ofJMenuBar
, which isAccessibleRole.MENU_BAR
.
- Overrides:
- getAccessibleRole in interface JComponent.AccessibleJComponent
- Returns:
- the accessible role of
JMenuBar
, which isAccessibleRole.MENU_BAR
public AccessibleSelection getAccessibleSelection()
Returns theAccessibleSelection
for this object. This method returnsthis
, since theAccessibleJMenuBar
manages its selection itself.
- Overrides:
- getAccessibleSelection in interface AccessibleContext
- Returns:
- the
AccessibleSelection
for this object
public Accessible getAccessibleSelection(int i)
Returns the selected with indexi
menu, ornull
if the specified menu is not selected.
- Specified by:
- getAccessibleSelection in interface AccessibleSelection
- Parameters:
i
- the index of the menu to return
- Returns:
- the selected with index
i
menu, ornull
if the specified menu is not selected
public int getAccessibleSelectionCount()
Returns the number of selected items in the menu bar. Possible values are0
if nothing is selected, or1
if one item is selected.
- Specified by:
- getAccessibleSelectionCount in interface AccessibleSelection
- Returns:
- the number of selected items in the menu bar
public AccessibleStateSet getAccessibleStateSet()
Returns the state of thisAccessibleJMenuBar
.
- Overrides:
- getAccessibleStateSet in interface JComponent.AccessibleJComponent
- Returns:
- the state of this
AccessibleJMenuBar
.
public boolean isAccessibleChildSelected(int i)
Returnstrue
if the specified menu is selected,false
otherwise.
- Specified by:
- isAccessibleChildSelected in interface AccessibleSelection
- Parameters:
i
- the index of the menu to check
- Returns:
true
if the specified menu is selected,false
otherwise
public void removeAccessibleSelection(int i)
Deselects the menu with indexi
.
- Specified by:
- removeAccessibleSelection in interface AccessibleSelection
- Parameters:
i
- the menu index to be deselected
public void selectAllAccessibleSelection()
In menu bars it is not possible to select all items, so this method does nothing.
- Specified by:
- selectAllAccessibleSelection in interface AccessibleSelection