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.
| Modifier and Type | Interface and Description |
|---|---|
| public interface | Accessible
Interface |
| public interface | AccessibleAction
The |
| public interface | AccessibleComponent
The |
| public interface | AccessibleEditableText
The |
| public interface | AccessibleExtendedComponent
The |
| public interface | AccessibleExtendedTable
Class |
| public interface | AccessibleExtendedText
The |
| public interface | AccessibleHypertext
The |
| public interface | AccessibleIcon
The |
| public interface | AccessibleKeyBinding
The |
| public interface | AccessibleSelection
This |
| public interface | AccessibleStreamable
The |
| public interface | AccessibleTable
Class |
| public interface | AccessibleTableModelChange
The |
| public interface | AccessibleText
The |
| public interface | AccessibleValue
The |
| Modifier and Type | Class and Description |
|---|---|
| public abstract class | AccessibilityProvider
Service Provider Interface (SPI) for Assistive Technology. |
| public class | AccessibleAttributeSequence
This class collects together the span of text that share the same contiguous set of attributes, along with that set of attributes. |
| public abstract class | AccessibleBundle
Base class used to maintain a strongly typed enumeration. |
| public abstract class | AccessibleContext
|
| public abstract class | AccessibleHyperlink
Encapsulation of a link, or set of links (e.g. client side imagemap) in a Hypertext document |
| public class | AccessibleRelation
Class |
| public class | AccessibleRelationSet
Class |
| public class | AccessibleResourceBundle
Deprecated
This class is deprecated as of version 1.3 of the Java Platform
A resource bundle containing the localized strings in the accessibility
package.
|
| public class | AccessibleRole
Class |
| public class | AccessibleState
Class |
| public class | AccessibleStateSet
Class |
| public class | AccessibleTextSequence
This class collects together key details of a span of text. |