Module java.desktop
Package javax.swing

Class JList.AccessibleJList.AccessibleJListChild

    • 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 AccessibleIcons 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