java.awt
Class MenuItem.AccessibleAWTMenuItem

java.lang.Object
  extended by javax.accessibility.AccessibleContext
      extended by java.awt.MenuComponent.AccessibleAWTMenuComponent
          extended by java.awt.MenuItem.AccessibleAWTMenuItem
All Implemented Interfaces:
Serializable, AccessibleAction, AccessibleComponent, AccessibleSelection, AccessibleValue
Direct Known Subclasses:
CheckboxMenuItem.AccessibleAWTCheckboxMenuItem, Menu.AccessibleAWTMenu
Enclosing class:
MenuItem

protected class MenuItem.AccessibleAWTMenuItem
extends MenuComponent.AccessibleAWTMenuComponent
implements AccessibleAction, AccessibleValue

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.accessibility.AccessibleContext
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
 
Fields inherited from interface javax.accessibility.AccessibleAction
DECREMENT, INCREMENT, TOGGLE_EXPAND
 
Constructor Summary
protected MenuItem.AccessibleAWTMenuItem()
          Constructor
 
Method Summary
 boolean doAccessibleAction(int i)
          Perform the specified action.
 AccessibleAction getAccessibleAction()
          Get any supported accessible actions.
 int getAccessibleActionCount()
          Get the number possible actions for this object, with the zeroth representing the default action.
 String getAccessibleActionDescription(int i)
          Get a description for the specified action.
 String getAccessibleName()
          Returns the accessible name of this component.
 AccessibleRole getAccessibleRole()
          Returns the accessible role of this component.
 AccessibleValue getAccessibleValue()
          Get any supported accessible value.
 Number getCurrentAccessibleValue()
          Gets the current value of this object, or null if it has not been set.
 Number getMaximumAccessibleValue()
          Gets the maximum value in the range of this object, or null if there is no maximum.
 Number getMinimumAccessibleValue()
          Gets the minimum value in the range of this object, or null if there is no minimum.
 boolean setCurrentAccessibleValue(Number number)
          Sets the current value of this object.
 
Methods inherited from class java.awt.MenuComponent.AccessibleAWTMenuComponent
addAccessibleSelection, addFocusListener, clearAccessibleSelection, contains, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleParent, getAccessibleSelection, getAccessibleSelection, getAccessibleSelectionCount, getAccessibleStateSet, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isAccessibleChildSelected, isEnabled, isFocusTraversable, isShowing, isVisible, removeAccessibleSelection, removeFocusListener, requestFocus, selectAllAccessibleSelection, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
 
Methods inherited from class javax.accessibility.AccessibleContext
addPropertyChangeListener, firePropertyChange, getAccessibleEditableText, getAccessibleIcon, getAccessibleRelationSet, getAccessibleTable, getAccessibleText, removePropertyChangeListener, setAccessibleDescription, setAccessibleName, setAccessibleParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuItem.AccessibleAWTMenuItem

protected MenuItem.AccessibleAWTMenuItem()
Constructor

Method Detail

getAccessibleName

public String getAccessibleName()
Description copied from class: MenuComponent.AccessibleAWTMenuComponent
Returns the accessible name of this component. This is the name given to the component, which may be null if not set using setName().

The name property is not the most suitable string to return for this method. The string should be localized, and relevant to the operation of the component. For example, it could be the text of a menu item. However, this can not be used at this level of abstraction, so it is the responsibility of subclasses to provide a more appropriate name.

Overrides:
getAccessibleName in class MenuComponent.AccessibleAWTMenuComponent
Returns:
a localized name for this component. Currently, this is just the contents of the name property
See Also:
MenuComponent.setName(String)

getAccessibleAction

public AccessibleAction getAccessibleAction()
Description copied from class: AccessibleContext
Get any supported accessible actions. The default implementation returns null.

Overrides:
getAccessibleAction in class AccessibleContext
Returns:
the supported action, or null
See Also:
AccessibleAction

getAccessibleRole

public AccessibleRole getAccessibleRole()
Description copied from class: MenuComponent.AccessibleAWTMenuComponent
Returns the accessible role of this component.

The abstract implementation of this method returns AccessibleRole.AWT_COMPONENT, as the abstract component has no specific role. This method should be overridden by concrete subclasses, so as to return an appropriate role for the component.

Overrides:
getAccessibleRole in class MenuComponent.AccessibleAWTMenuComponent
Returns:
AccessibleRole.AWT_COMPONENT
See Also:
AccessibleRole

getAccessibleActionCount

public int getAccessibleActionCount()
Description copied from interface: AccessibleAction
Get the number possible actions for this object, with the zeroth representing the default action.

Specified by:
getAccessibleActionCount in interface AccessibleAction
Returns:
the 0-based number of actions

getAccessibleActionDescription

public String getAccessibleActionDescription(int i)
Description copied from interface: AccessibleAction
Get a description for the specified action. Returns null if out of bounds.

Specified by:
getAccessibleActionDescription in interface AccessibleAction
Parameters:
i - the action to describe, 0-based
Returns:
description of the action

doAccessibleAction

public boolean doAccessibleAction(int i)
Description copied from interface: AccessibleAction
Perform the specified action. Does nothing if out of bounds.

Specified by:
doAccessibleAction in interface AccessibleAction
Parameters:
i - the action to perform, 0-based
Returns:
true if the action was performed

getAccessibleValue

public AccessibleValue getAccessibleValue()
Description copied from class: AccessibleContext
Get any supported accessible value. The default implementation returns null.

Overrides:
getAccessibleValue in class AccessibleContext
Returns:
the supported value, or null
See Also:
AccessibleValue

getCurrentAccessibleValue

public Number getCurrentAccessibleValue()
Description copied from interface: AccessibleValue
Gets the current value of this object, or null if it has not been set.

Specified by:
getCurrentAccessibleValue in interface AccessibleValue
Returns:
the current value, or null
See Also:
AccessibleValue.setCurrentAccessibleValue(Number)

setCurrentAccessibleValue

public boolean setCurrentAccessibleValue(Number number)
Description copied from interface: AccessibleValue
Sets the current value of this object. Returns true if the number successfully changed.

Specified by:
setCurrentAccessibleValue in interface AccessibleValue
Parameters:
number - the new value
Returns:
true on success

getMinimumAccessibleValue

public Number getMinimumAccessibleValue()
Description copied from interface: AccessibleValue
Gets the minimum value in the range of this object, or null if there is no minimum.

Specified by:
getMinimumAccessibleValue in interface AccessibleValue
Returns:
the minimum
See Also:
AccessibleValue.getMaximumAccessibleValue()

getMaximumAccessibleValue

public Number getMaximumAccessibleValue()
Description copied from interface: AccessibleValue
Gets the maximum value in the range of this object, or null if there is no maximum.

Specified by:
getMaximumAccessibleValue in interface AccessibleValue
Returns:
the maximum
See Also:
AccessibleValue.getMinimumAccessibleValue()