JList.AccessibleJList.AccessibleJListChild (Java SE 11 & JDK 11 )
Keywords: javax.swing.JList.AccessibleJList.AccessibleJListChild class

Module java.desktop
Package javax.swing

## 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

    Constructors
    Constructor | Description
    --- | ---
    `AccessibleJListChild​(JList<E> parent, int indexInParent)` | Constructs an `AccessibleJListChild`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `doAccessibleAction​(int i)` | Performs the specified action on the object.
    `AccessibleAction` | `getAccessibleAction()` | Gets the `AccessibleAction` associated with this object that supports one or more actions.
    `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 `AccessibleIcon`s or a `null` array if the renderer component contains no icons.

    - ### 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:
        `getAccessibleContext` in interface `Accessible`
      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:
        `getAccessibleComponent` in class `AccessibleContext`
      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 `AccessibleIcon`s or a `null` array if the renderer component contains no icons.
      Overrides:
        `getAccessibleIcon` in class `AccessibleContext`
      Returns:
        an array containing the accessible icon or a `null` array 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:
        `getAccessibleAction` in class `AccessibleContext`
      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:
        `AccessibleAction` if supported by object; else return `null`
      Since:
        9
      See Also:
        `AccessibleAction`

    - #### doAccessibleAction

          public boolean doAccessibleAction​(int i)

      Performs the specified action on the object.
      Specified by:
        `doAccessibleAction` in interface `AccessibleAction`
      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:
        `true` if the action was performed; otherwise `false`
      Since:
        9
      See Also:
        `AccessibleAction.getAccessibleActionCount()`

    - #### getAccessibleActionDescription

          public String getAccessibleActionDescription​(int i)

      Returns a description of the specified action of the object.
      Specified by:
        `getAccessibleActionDescription` in interface `AccessibleAction`
      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 `String` description 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:
        `getAccessibleActionCount` in interface `AccessibleAction`
      Implementation Requirements:
        Returns 1, i.e. there is only one action.
      Returns:
        the zero-based number of actions in this object
      Since:
        9