Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
javax.accessibility.AccessibleContext
java.awt.MenuComponent.AccessibleAWTMenuComponent
java.awt.MenuItem.AccessibleAWTMenuItem
protected class MenuItem.AccessibleAWTMenuItem
implements AccessibleAction, AccessibleValue
Field Summary |
Fields inherited from interface javax.accessibility.AccessibleAction | |
CLICK , DECREMENT , INCREMENT , TOGGLE_EXPAND , TOGGLE_POPUP |
Constructor Summary | |
|
Method Summary | |
boolean |
|
AccessibleAction | |
int |
|
String |
|
String |
|
AccessibleRole |
|
AccessibleValue | |
Number |
|
Number |
|
Number |
|
boolean |
|
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
public boolean doAccessibleAction(int i)
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
public AccessibleAction getAccessibleAction()
- Overrides:
- getAccessibleAction in interface AccessibleContext
public int getAccessibleActionCount()
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
public String getAccessibleActionDescription(int i)
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
public String getAccessibleName()
Returns the accessible name of this component. This is the name given to the component, which may be null if not set usingsetName()
.
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 interface MenuComponent.AccessibleAWTMenuComponent
- Returns:
- a localized name for this component. Currently, this is just the contents of the name property
- See Also:
MenuComponent.setName(String)
public AccessibleRole getAccessibleRole()
Returns the accessible role of this component.
The abstract implementation of this method returnsAccessibleRole.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 interface MenuComponent.AccessibleAWTMenuComponent
- Returns:
AccessibleRole.AWT_COMPONENT
public AccessibleValue getAccessibleValue()
- Overrides:
- getAccessibleValue in interface AccessibleContext
public Number getCurrentAccessibleValue()
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
public Number getMaximumAccessibleValue()
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
public Number getMinimumAccessibleValue()
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
public boolean setCurrentAccessibleValue(Number number)
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