| <HTML> |
| <HEAD> |
| <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> |
| <META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (WinNT; I) [Netscape]"> |
| <!-- |
| Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. |
| DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| |
| This code is free software; you can redistribute it and/or modify it |
| under the terms of the GNU General Public License version 2 only, as |
| published by the Free Software Foundation. Oracle designates this |
| particular file as subject to the "Classpath" exception as provided |
| by Oracle in the LICENSE file that accompanied this code. |
| |
| This code is distributed in the hope that it will be useful, but WITHOUT |
| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| version 2 for more details (a copy is included in the LICENSE file that |
| accompanied this code). |
| |
| You should have received a copy of the GNU General Public License version |
| 2 along with this work; if not, write to the Free Software Foundation, |
| Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
| |
| Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
| CA 95054 USA or visit www.sun.com if you need additional information or |
| have any questions. |
| --> |
| </HEAD> |
| <BODY BGCOLOR="#FFFFFF"> |
| Defines a contract between user-interface components and an assistive technology |
| that provides access to those components. If a Java application fully supports |
| the Java Accessibility API, then it should be compatible with, and friendly |
| toward, assistive technologies such as screen readers, screen magnifiers, |
| etc. With a Java application that fully supports the Java Accessibility |
| API, no screen reader off screen model would be necessary because the API |
| provides all of the information normally contained in an off screen model. |
| |
| <P>The Java Accessibility API package consists of 8 Java programming language |
| interfaces, and 6 Java programming language classes. These are described |
| below. |
| <H3> |
| <A NAME="Accessible"></A><A HREF="Accessible.html">Interface Accessible</A></H3> |
| <A HREF="Accessible.html">Interface Accessible</A> is the main interface |
| of the Java Accessibility API. All components that support the Java Accessibility |
| API must implement this interface. It contains a single method, <TT>getAccessibleContext</TT>, |
| that returns an instance of the class <A HREF="#AccessibleContext">AccessibleContext</A>. |
| 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. |
| <H3> |
| <A NAME="AccessibleContext"></A><A HREF="AccessibleContext.html">Class |
| AccessibleContext</A></H3> |
| <A HREF="AccessibleContext.html">AccessibleContext</A> represents the minimum |
| information all accessible objects return and is obtained by calling the |
| <TT>getAccessibleContext</TT> method on an object that implements the <A HREF="#Accessible">Accessible</A> |
| interface. This information includes the accessible name, description, |
| <A HREF="#AccessibleRole">role</A>, and <A HREF="#AccessibleState">state</A> |
| of the object, as well as information about the parent and children of |
| the object. In addition, JavaBeans <SUP><FONT SIZE=-2>TM</FONT></SUP> |
| property change support is also included to allow assisitive 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: |
| <UL> |
| <LI> |
| <B><A HREF="#AccessibleAction">AccessibleAction</A></B> - the object can |
| perform one or more actions. This interface provides the standard mechanism |
| for an assistive technology to determine what those actions are and tell |
| the object to perform those actions. Any object that can be manipulated |
| should return an object that implements this interface when the <TT>getAccessibleAction</TT> |
| method is called on an AccessibleContext.</LI> |
| |
| <LI> |
| <B><A HREF="#AccessibleComponent">AccessibleComponent</A></B> - the object |
| has a graphical representation. This interface provides the standard mechanism |
| for an assistive technology to determine and set the graphical representation |
| of the object. Any object that is rendered on the screen should return |
| an object that implements this interface when the <TT>getAccessibleComponent</TT> |
| method is called on an AccessibleContext.</LI> |
| |
| <LI> |
| <B><A HREF="#AccessibleSelection">AccessibleSelection</A></B> - the object |
| allows its children to be selected. This interface provides the standard |
| mechanism for an assistive technology to determine the currently selected |
| children as well as modify the selection set. Any object that has children |
| that can be selected should return an object that implements this interface |
| when the <TT>getAccessibleSelection</TT> method is called on an AccessibleContext.</LI> |
| |
| <LI> |
| <B><A HREF="#AccessibleText">AccessibleText</A></B> - the object presents |
| editable textual information on the display. This interface provides the |
| standard mechanism for an assistive technology to access that text via |
| its content, attributes, and spatial location. Any object that contains |
| editable text should return an object that implements this interface when |
| the <TT>getAccessibleText</TT> method is called on an AccessibleContext.</LI> |
| |
| <LI> |
| <B><A HREF="#AccessibleHypertext">AccessibleHypertext</A></B> - the object |
| presents hypertext information on the display. This interface provides |
| the standard mechanism for an assistive technology to access that hypertext |
| via its content, attributes, and spatial location. Any object that contains |
| hypertext should return an object that implements this interface when the |
| <TT>getAccessibleText</TT> method is called on an AccessibleContext.</LI> |
| |
| <LI> |
| <B><A HREF="#AccessibleValue">AccessibleValue</A></B> - the object supports |
| a numerical value. This interface provides the standard mechanism for an |
| assistive technology to determine and set the current value of the object, |
| as well as the minimum and maximum values. Any object that supports a numerical |
| value should return an object that implements this interface when the <TT>getAccessibleValue</TT> |
| method is called on an AccessibleContext.</LI> |
| </UL> |
| |
| <H3> |
| <A NAME="AccessibleRole"></A><A HREF="AccessibleRole.html">Class AccessibleRole</A></H3> |
| This class encapsulates the Accessible object's role in the user interface |
| and is obtained by calling the <TT>getAccessibleRole</TT> method on an |
| <A HREF="#AccessibleContext">AccessibleContext</A>. Accessible roles include |
| "Check box", "Menu Item", "Panel", etc. These roles are identified by the |
| constants in this class such as <TT>AccessibleRole.CHECK_BOX, AccessibleRole.MENU_ITEM,</TT> |
| and <TT>AccessibleRole.PANEL</TT>. 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. |
| |
| <H3> |
| <A NAME="AccessibleState"></A><A HREF="AccessibleState.html">Class AccessibleState</A></H3> |
| This class encapsulates a particular state of the Accessible object. Accessible |
| states include things like "Armed", "Busy", "Checked", "Focused", etc. |
| These roles are identified by the constants in this class such as <TT>AccessibleState.ARMED, |
| AccessibleState.BUSY, AccessibleState.CHECKED,</TT> and <TT>AccessibleState.FOCUSED</TT>. |
| The sum of all the states of an Accessible object is called the <A HREF="#AccessibleStateSet">AccessibleStateSet</A>, |
| and can be obtained by calling the <TT>getAccessibleStateSet</TT> method |
| on an <A HREF="#AccessibleContext">AccessibleContext</A>. |
| |
| <P>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. |
| |
| <H3> |
| <A NAME="AccessibleStateSet"></A><A HREF="AccessibleStateSet.html">Class |
| AccessibleStateSet</A></H3> |
| This class encapsulates a collection of states of the Accessible object |
| and is obtained by calling the <TT>getAccessibleStateSet</TT> method on |
| an <A HREF="#AccessibleContext">AccessibleContext</A>. 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 <A HREF="#AccessibleState">AccessibleStates</A> |
| on the state set. |
| <H3> |
| <A NAME="AccessibleBundle"></A><A HREF="AccessibleBundle.html">Class AccessibleBundle</A></H3> |
| This class is used to maintain a strongly typed enumeration. It is the |
| super class of both the <A HREF="#AccessibleRole">AccessibleRole</A> and |
| <A HREF="#AccessibleState">AccessibleState</A> classes. Programmers normally |
| do not interact with this class directly, but will instead use the <A HREF="#AccessibleRole">AccessibleRole</A> |
| and <A HREF="#AccessibleState">AccessibleState</A> classes. |
| |
| <H3> |
| <A NAME="AccessibleAction"></A><A HREF="AccessibleAction.html">Interface |
| AccessibleAction</A></H3> |
| The <A HREF="AccessibleAction.html">AccessibleAction</A> interface should |
| be supported by any object that can perform one or more actions. This interface |
| provides the standard mechanism for an assistive technology to determine |
| what those actions are as well as tell the object to perform those actions. |
| Any object that can be manipulated should support this interface. |
| |
| <P>Applications can determine if an object supports the AccessibleAction |
| interface by first obtaining its <A HREF="#AccessibleContext">AccessibleContext</A> |
| (see <A HREF="#Accessible">Accessible</A>) and then calling the <TT>getAccessibleAction</TT> |
| method of <A HREF="#AccessibleContext">AccessibleContext</A>. If the return |
| value is not null, the object supports this interface. |
| <H3> |
| <A NAME="AccessibleComponent"></A><A HREF="AccessibleComponent.html">Interface |
| AccessibleComponent</A></H3> |
| The <A HREF="AccessibleComponent.html">AccessibleComponent</A> interface |
| should be supported by any object that is rendered on the screen. This |
| interface provides the standard mechanism for an assistive technology to |
| determine and set the graphical representation of an object. |
| |
| <P>Applications can determine if an object supports the AccessibleComponent |
| interface by first obtaining its <A HREF="#AccessibleContext">AccessibleContext</A> |
| (see <A HREF="#Accessible">Accessible</A>) and then calling the <TT>getAccessibleComponent</TT> |
| method of <A HREF="#AccessibleContext">AccessibleContext</A>. If the return |
| value is not null, the object supports this interface. |
| <H3> |
| <A NAME="AccessibleSelection"></A><A HREF="AccessibleSelection.html">Interface |
| AccessibleSelection</A></H3> |
| The <A HREF="AccessibleSelection.html">AccessibleSelection</A> interface |
| provides the standard mechanism for an assistive technology to determine |
| what the current selected children are, as well as modify the selection |
| set. Any object that has children that can be selected should support this |
| the AccessibleSelection interface. |
| |
| <P>Applications can determine if an object supports the AccessibleSelection |
| interface by first obtaining its <A HREF="#AccessibleContext">AccessibleContext</A> |
| (see <A HREF="#Accessible">Accessible</A>) and then calling the <TT>getAccessibleSelection</TT> |
| method of <A HREF="#AccessibleContext">AccessibleContext</A>. If the return |
| value is not null, the object supports this interface. |
| <H3> |
| <A NAME="AccessibleText"></A><A HREF="AccessibleText.html">Interface AccessibleText</A></H3> |
| Interface <A HREF="AccessibleText.html">AccessibleText</A> is the contract |
| for making rich, editable text Accessible. Not all text displayed on the |
| screen is rich and editable (e.g. text contained in buttons, labels, menus, |
| etc., which users aren't expected to manipulate). However, objects containing |
| editable text must implement interface AccessibleText if they are to interoperate |
| with assistive technologies. |
| |
| <P>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. |
| |
| <P>Applications can determine if an object supports the AccessibleText |
| interface by first obtaining its <A HREF="#AccessibleContext">AccessibleContext</A> |
| (see <A HREF="#Accessible">Accessible</A>) and then calling the <TT>getAccessibleText</TT> |
| method of <A HREF="#AccessibleContext">AccessibleContext</A>. If the return |
| value is not null, the object supports this interface. |
| <H3><A NAME="AccessibleHypertext"></A> |
| <A HREF="AccessibleHypertext.html">Interface AccessibleHypertext</A></H3> |
| The <A HREF="AccessibleHypertext.html">AccessibleHypertext</A> interface |
| should be supported by any object that presents hypertext information on |
| the display. This interface provides the standard mechanism for an assistive |
| technology to access that text via its content, attributes, and spatial |
| location. It also provides standard mechanisms for manipulating <A HREF="#AccessibleHyperlink">hyperlinks</A>. |
| Applications can determine if an object supports the AccessibleHypertext |
| interface by first obtaining its <A HREF="#AccessibleContext">AccessibleContext</A> |
| (see <A HREF="#Accessible">Accessible</A>) and then calling the AccessibleContext.getAccessibleText() |
| method of <A HREF="#AccessibleContext">AccessibleContext</A>. If the return |
| value is a class which extends AccessibleHypertext, then that object supports |
| AccessibleHypertext. |
| <H3> |
| <A NAME="AccessibleHyperlink"></A><A HREF="AccessibleHyperlink.html">Interface |
| AccessibleHyperlink</A></H3> |
| An object that is a hyperlink should support the <A HREF="AccessibleHyperlink.html">AccessibleHyperlink</A> |
| interface. An object that implements this interface will be returned |
| by calling the getLink method on an <A HREF="#AccessibleHypertext">AccessibleHypertext</A> |
| object. |
| <H3> |
| <A NAME="AccessibleValue"></A><A HREF="AccessibleValue.html">Interface |
| AccessibleValue</A></H3> |
| The <A HREF="AccessibleValue.html">AccessibleValue</A> interface should |
| be supported by any object that supports a numerical value (e.g., a scroll |
| bar). This interface provides the standard mechanism for an assistive technology |
| to determine and set the numerical value as well as get the minimum and |
| maximum values. |
| |
| <P>Applications can determine if an object supports the AccessibleValue |
| interface by first obtaining its <A HREF="#AccessibleContext">AccessibleContext</A> |
| (see <A HREF="#Accessible">Accessible</A>) and then calling the <TT>getAccessibleValue</TT> |
| method of <A HREF="#AccessibleContext">AccessibleContext</A>. If the return |
| value is not null, the object supports this interface. |
| |
| @since 1.2 |
| </BODY> |
| </HTML> |
| |