Class JList.AccessibleJList.AccessibleJListChild
- java.lang.Object
-
- javax.accessibility.AccessibleContext
-
- javax.swing.JList.AccessibleJList.AccessibleJListChild
- All Implemented Interfaces:
-
Accessible,AccessibleAction,AccessibleComponent
- Enclosing class:
- JList.AccessibleJList
protected class JList.AccessibleJList.AccessibleJListChild extends AccessibleContext implements Accessible, AccessibleComponent, AccessibleAction
This class implements accessibility support appropriate for list children.
Field Summary
Fields declared in 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 declared in interface javax.accessibility.AccessibleAction
CLICK, DECREMENT, INCREMENT, TOGGLE_EXPAND, TOGGLE_POPUP Constructor Summary
| Constructor | Description |
|---|---|
AccessibleJListChild(JList<E> parent,
int indexInParent) | Constructs an |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
boolean | doAccessibleAction(int i) | Performs the specified action on the object. |
AccessibleAction | getAccessibleAction() | Gets the |
int | getAccessibleActionCount() | Returns the number of accessible actions available in this object If there are more than one, the first one is considered the "default" action of the object. |
String | getAccessibleActionDescription(int i) | Returns a description of the specified action of the object. |
AccessibleComponent | getAccessibleComponent() | Get the AccessibleComponent associated with this object. |
AccessibleContext | getAccessibleContext() | Get the AccessibleContext for this object. |
AccessibleIcon[] | getAccessibleIcon() | Returns the icon for the element renderer, as the only item of an array of |
Methods declared in class javax.accessibility.AccessibleContext
addPropertyChangeListener, firePropertyChange, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleEditableText, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getAccessibleRelationSet, getAccessibleRole, getAccessibleSelection, getAccessibleStateSet, getAccessibleTable, getAccessibleText, getAccessibleValue, getLocale, removePropertyChangeListener, setAccessibleDescription, setAccessibleName, setAccessibleParent Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Methods declared in interface javax.accessibility.AccessibleComponent
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 Constructor Detail
AccessibleJListChild
public AccessibleJListChild(JList<E> parent,
int indexInParent) Constructs an AccessibleJListChild.
- Parameters:
-
parent- the parent -
indexInParent- the index in the parent
Method Detail
getAccessibleContext
public AccessibleContext getAccessibleContext()
Get the AccessibleContext for this object. In the implementation of the Java Accessibility API for this class, returns this object, which is its own AccessibleContext.
- Specified by:
-
getAccessibleContextin interfaceAccessible - Returns:
- this object
getAccessibleComponent
public AccessibleComponent getAccessibleComponent()
Get the AccessibleComponent associated with this object. In the implementation of the Java Accessibility API for this class, return this object, which is responsible for implementing the AccessibleComponent interface on behalf of itself.
- Overrides:
-
getAccessibleComponentin classAccessibleContext - Returns:
- this object
- See Also:
AccessibleComponent
getAccessibleIcon
public AccessibleIcon[] getAccessibleIcon()
Returns the icon for the element renderer, as the only item of an array of AccessibleIcons or a null array if the renderer component contains no icons.
- Overrides:
-
getAccessibleIconin classAccessibleContext - Returns:
- an array containing the accessible icon or a
nullarray if none - Since:
- 1.3
- See Also:
AccessibleIcon
getAccessibleAction
public AccessibleAction getAccessibleAction()
Gets the AccessibleAction associated with this object that supports one or more actions.
- Overrides:
-
getAccessibleActionin classAccessibleContext - Implementation Requirements:
- Returns the AccessibleAction for this AccessibleJListChild as follows: First getListCellRendererComponent of the ListCellRenderer for the component at the "index in parent" of this child is called. Then its AccessibleContext is fetched and that AccessibleContext's AccessibleAction is returned. Note that if an AccessibleAction is not found using this process then this object with its implementation of the AccessibleAction interface is returned.
- Returns:
-
AccessibleActionif supported by object; else returnnull - Since:
- 9
- See Also:
AccessibleAction
doAccessibleAction
public boolean doAccessibleAction(int i)
Performs the specified action on the object.
- Specified by:
-
doAccessibleActionin interfaceAccessibleAction - Implementation Requirements:
- If i == 0 selects this AccessibleJListChild by calling JList.this.setSelectedIndex(indexInParent) and then returns true; otherwise returns false.
- Parameters:
-
i- zero-based index of actions - Returns:
-
trueif the action was performed; otherwisefalse - Since:
- 9
- See Also:
AccessibleAction.getAccessibleActionCount()
getAccessibleActionDescription
public String getAccessibleActionDescription(int i)
Returns a description of the specified action of the object.
- Specified by:
-
getAccessibleActionDescriptionin interfaceAccessibleAction - Implementation Requirements:
- If i == 0 returns the action description fetched from UIManager.getString("AbstractButton.clickText"); otherwise returns null.
- Parameters:
-
i- zero-based index of the actions - Returns:
- a
Stringdescription of the action - Since:
- 9
- See Also:
AccessibleAction.getAccessibleActionCount()
getAccessibleActionCount
public int getAccessibleActionCount()
Returns the number of accessible actions available in this object If there are more than one, the first one is considered the "default" action of the object.
- Specified by:
-
getAccessibleActionCountin interfaceAccessibleAction - Implementation Requirements:
- Returns 1, i.e. there is only one action.
- Returns:
- the zero-based number of actions in this object
- Since:
- 9