The Java Accessibility API package consists of 8 Java programming language interfaces, and 6 Java programming language classes. These are described below.
getAccessibleContext
, that returns an instance of the class AccessibleContext. Sun thinks that implementing this interface is the absolute minimum requirement of every object that is part of the user interface of a Java application, if that program is to be compatible with assistive technologies. getAccessibleContext
method on an object that implements the Accessible interface. This information includes the accessible name, description, role, and state of the object, as well as information about the parent and children of the object. In addition, JavaBeans property change support is also included to allow assistive technologies learn when the values of the accessible properties change. AccessibleContext also contains methods for obtaining more specific accessibility information about a component. If the component supports it, these methods will return an object that implements one or more of the following interfaces: getAccessibleAction
method is called on an AccessibleContext. getAccessibleComponent
method is called on an AccessibleContext.getAccessibleSelection
method is called on an AccessibleContext.getAccessibleText
method is called on an AccessibleContext.getAccessibleText
method is called on an AccessibleContext.getAccessibleValue
method is called on an AccessibleContext.getAccessibleRole
method on an AccessibleContext. Accessible roles include "Check box", "Menu Item", "Panel", etc. These roles are identified by the constants in this class such as AccessibleRole.CHECK_BOX,
AccessibleRole.MENU_ITEM,
and AccessibleRole.PANEL
. The constants in this class present a strongly typed enumeration of common object roles. A public constructor for this class has been purposely omitted and applications should use one of the constants from this class. Although this class pre-defines a large list of standard roles, it is extensible so additional programmer-defined roles can be added in the future without needing to modify the base class. AccessibleState.ARMED, AccessibleState.BUSY, AccessibleState.CHECKED,
and AccessibleState.FOCUSED
. The sum of all the states of an Accessible object is called the AccessibleStateSet, and can be obtained by calling the getAccessibleStateSet
method on an AccessibleContext. The constants in this class present a strongly typed enumeration of common object roles. A public constructor for this class has been purposely omitted and applications should use one of the constants from this class. Although this class pre-defines a large list of standard roles, it is extensible so additional, programmer-defined roles can be added in the future without needing to modify the base class.
getAccessibleStateSet
method on an AccessibleContext. Since an object might have multiple states (e.g. it might be both "Checked" and "Focused"), this class is needed to encapsulate a collection of these states. Methods in the class provide for retrieving the individual AccessibleStates on the state set. Applications can determine if an object supports the AccessibleAction interface by first obtaining its AccessibleContext (see Accessible) and then calling the getAccessibleAction
method of AccessibleContext. If the return value is not null
, the object supports this interface.
Applications can determine if an object supports the AccessibleComponent interface by first obtaining its AccessibleContext (see Accessible) and then calling the getAccessibleComponent
method of AccessibleContext. If the return value is not null
, the object supports this interface.
Applications can determine if an object supports the AccessibleSelection interface by first obtaining its AccessibleContext (see Accessible) and then calling the getAccessibleSelection
method of AccessibleContext. If the return value is not null
, the object supports this interface.
This interface provides support for going between pixel coordinates and the text at a given pixel coordinate, for retrieving the letter, word, and sentence at, before, or after a given position in the text. This interface provides support for retrieving the attributes of the character at a given position in the text (font, font size, style, etc.), as well as getting the selected text (if any), the length of the text, and the location of the text caret.
Applications can determine if an object supports the AccessibleText interface by first obtaining its AccessibleContext (see Accessible) and then calling the getAccessibleText
method of AccessibleContext. If the return value is not null
, the object supports this interface.
Applications can determine if an object supports the AccessibleValue interface by first obtaining its AccessibleContext (see Accessible) and then calling the getAccessibleValue
method of AccessibleContext. If the return value is not null
, the object supports this interface.
Class | Description |
---|---|
AccessibilityProvider | Service Provider Interface (SPI) for Assistive Technology. |
Accessible | Interface Accessible is the main interface for the accessibility package. |
AccessibleAction | The AccessibleAction interface should be supported by any object that can perform one or more actions. |
AccessibleAttributeSequence | This class collects together the span of text that share the same contiguous set of attributes, along with that set of attributes. |
AccessibleBundle | Base class used to maintain a strongly typed enumeration. |
AccessibleComponent | The AccessibleComponent interface should be supported by any object that is rendered on the screen. |
AccessibleContext | AccessibleContext represents the minimum information all accessible objects return. |
AccessibleEditableText | The AccessibleEditableText interface should be implemented by all classes that present editable textual information on the display. |
AccessibleExtendedComponent | The AccessibleExtendedComponent interface should be supported by any object that is rendered on the screen. |
AccessibleExtendedTable | Class AccessibleExtendedTable provides extended information about a user-interface component that presents data in a two-dimensional table format. |
AccessibleExtendedText | The AccessibleExtendedText interface contains additional methods not provided by the AccessibleText interface. |
AccessibleHyperlink | Encapsulation of a link, or set of links (e.g. client side imagemap) in a Hypertext document |
AccessibleHypertext | The AccessibleHypertext class is the base class for all classes that present hypertext information on the display. |
AccessibleIcon | The AccessibleIcon interface should be supported by any object that has an associated icon (e.g., buttons). |
AccessibleKeyBinding | The AccessibleKeyBinding interface should be supported by any object that has a keyboard bindings such as a keyboard mnemonic and/or keyboard shortcut which can be used to select the object. |
AccessibleRelation | Class AccessibleRelation describes a relation between the object that implements the AccessibleRelation and one or more other objects. |
AccessibleRelationSet | Class AccessibleRelationSet determines a component's relation set. |
AccessibleResourceBundle | Deprecated. This class is deprecated as of version 1.3 of the Java Platform |
AccessibleRole | Class AccessibleRole determines the role of a component. |
AccessibleSelection | This AccessibleSelection interface provides the standard mechanism for an assistive technology to determine what the current selected children are, as well as modify the selection set. |
AccessibleState | Class AccessibleState describes a component's particular state. |
AccessibleStateSet | Class AccessibleStateSet determines a component's state set. |
AccessibleStreamable | The AccessibleStreamable interface should be implemented by the AccessibleContext of any component that presents the raw stream behind a component on the display screen. |
AccessibleTable | Class AccessibleTable describes a user-interface component that presents data in a two-dimensional table format. |
AccessibleTableModelChange | The AccessibleTableModelChange interface describes a change to the table model. |
AccessibleText | The AccessibleText interface should be implemented by all classes that present textual information on the display. |
AccessibleTextSequence | This class collects together key details of a span of text. |
AccessibleValue | The AccessibleValue interface should be supported by any object that supports a numerical value (e.g., a scroll bar). |
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/accessibility/package-summary.html