protected class JMenu.AccessibleJMenu extends JMenuItem.AccessibleJMenuItem implements AccessibleSelection
JMenu
.JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
accessibleContainerHandler, accessibleFocusHandler
accessibleAWTComponentHandler, accessibleAWTFocusHandler
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_COMPONENT_BOUNDS_CHANGED, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_HYPERTEXT_OFFSET, ACCESSIBLE_INVALIDATE_CHILDREN, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
CLICK, DECREMENT, INCREMENT, TOGGLE_EXPAND, TOGGLE_POPUP
CHARACTER, SENTENCE, WORD
Modifier | Constructor and Description |
---|---|
protected |
JMenu.AccessibleJMenu() |
Modifier and Type | Method and Description |
---|---|
void |
addAccessibleSelection(int index)
Selects the accessible child with the specified index.
|
void |
clearAccessibleSelection()
Removes all possibly selected accessible children of this object from
the selection.
|
Accessible |
getAccessibleChild(int index)
Returns the accessible child with the specified
index . |
int |
getAccessibleChildrenCount()
Returns the number of accessible children of this object.
|
AccessibleRole |
getAccessibleRole()
Returns the accessible role of this object, which is
AccessibleRole.MENU for the AccessibleJMenu. |
AccessibleSelection |
getAccessibleSelection()
Returns the accessible selection of this object.
|
Accessible |
getAccessibleSelection(int index)
Returns the selected accessible child with the specified
index . |
int |
getAccessibleSelectionCount()
Returns the number of selected accessible children.
|
boolean |
isAccessibleChildSelected(int index)
Returns
true if the accessible child with the specified
index is selected, false otherwise. |
void |
removeAccessibleSelection(int index)
Removes the item with the specified index from the selection.
|
void |
selectAllAccessibleSelection()
AccessibleJMenu don't support multiple selection, so this method
does nothing.
|
stateChanged
doAccessibleAction, getAccessibleAction, getAccessibleActionCount, getAccessibleActionDescription, getAccessibleIcon, getAccessibleName, getAccessibleRelationSet, getAccessibleStateSet, getAccessibleText, getAccessibleValue, getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getCurrentAccessibleValue, getIndexAtPoint, getMaximumAccessibleValue, getMinimumAccessibleValue, getSelectedText, getSelectionEnd, getSelectionStart, setCurrentAccessibleValue
addPropertyChangeListener, getAccessibleDescription, getAccessibleKeyBinding, getBorderTitle, getTitledBorderText, getToolTipText, removePropertyChangeListener
getAccessibleAt
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
firePropertyChange, getAccessibleEditableText, getAccessibleTable, setAccessibleDescription, setAccessibleName, setAccessibleParent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addFocusListener, contains, getAccessibleAt, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
protected JMenu.AccessibleJMenu()
public int getAccessibleChildrenCount()
getAccessibleChildrenCount
in class JComponent.AccessibleJComponent
AccessibleContext.getAccessibleChild(int)
public Accessible getAccessibleChild(int index)
index
.getAccessibleChild
in class JComponent.AccessibleJComponent
index
- the index of the child to fetchindex
Component.AccessibleAWTComponent.getAccessibleChildrenCount()
public AccessibleSelection getAccessibleSelection()
this
here.getAccessibleSelection
in class AccessibleContext
AccessibleSelection
public Accessible getAccessibleSelection(int index)
index
.getAccessibleSelection
in interface AccessibleSelection
index
- the index of the accessible selected child to returnindex
AccessibleSelection.getAccessibleSelectionCount()
public boolean isAccessibleChildSelected(int index)
true
if the accessible child with the specified
index is selected, false
otherwise.isAccessibleChildSelected
in interface AccessibleSelection
index
- the index of the accessible child to checktrue
if the accessible child with the specified
index is selected, false
otherwisepublic AccessibleRole getAccessibleRole()
AccessibleRole.MENU
for the AccessibleJMenu.getAccessibleRole
in class JMenuItem.AccessibleJMenuItem
AccessibleRole
public int getAccessibleSelectionCount()
0
if no item is selected, or 1
if an item
is selected. AccessibleJMenu can have maximum 1 selected item.getAccessibleSelectionCount
in interface AccessibleSelection
public void addAccessibleSelection(int index)
addAccessibleSelection
in interface AccessibleSelection
index
- the index of the accessible child to selectpublic void removeAccessibleSelection(int index)
removeAccessibleSelection
in interface AccessibleSelection
index
- the index of the selected item to remove from the selectionpublic void clearAccessibleSelection()
clearAccessibleSelection
in interface AccessibleSelection
public void selectAllAccessibleSelection()
selectAllAccessibleSelection
in interface AccessibleSelection