Spec-Zone .ru
спецификации, руководства, описания, API
Java

Accessibility

New Features in the JavaTM 2 Platform, v1.3

Java 2 SDK Contents

Contents

API Enhancements
Accessible Icon
Accessible Relation and Accessible Relation Set
Accessible Table
Accessible Table Model Change
AWT Accessibility Support for Lightweight Components
Accessible Applet
AWT Robot

API Enhancements

The following new classes and interfaces have been added to the JavaTM Accessibility API in version 1.3 of the Java 2 Platform: In addition, javax.accessibility.AccessibleContext was updated to reflect the new classes and interfaces.

Accessible Icon

AccessibleIcon provides information about an icon's description and dimension. It also allows these properties to be set by the application developer. This feature is implemented by Swing icons.

Accessible Relation and Accessible Relation Set

AccessibleRelation and AccessibleRelationSet provide information about the ways user interface objects are related to each other. Each relation is captured in an AccessibleRelation object, and the full set of relations that any given user interface object is involved in are expressed in that object's AccessibleRelationSet.

Unlike most of the rest of the Accessibility API, there is currently no built-in support for having AccessibleRelations set automatically by Swing. This means that even if a programmer is doing nothing out of the ordinary - using standard components in standard ways - the AccessibleRelation information will have to be specifically included by the programmer.

The only exception to this is if the programmer uses the JLabel.setLabelFor() method to link a label to the thing it labels. This will cause an accessible relationship to be created.

Accessible Table

AccessibleTable provides information about tables, and is implemented by Swing's JTable.AccessibleJTable class. It allows a range of table-specific attributes to be identified adn manipulated. Such properties include text selections, the first and last row and column of the table, its total number of rows and columns, the text of its captions and headers, and other descriptions about its contents and format. As in the AccessibleIcon interface, these kinds of properties (descriptions, captions, and headers) can be set or modified by users and developers.

Accessible Table Model Change

AccessibleTableModelChange is a helper class which encapsulates a change to the model of a table. Such changes can inlcude insertions, deletions, and data updates.

AWT Accessibililty Support for Lightweight Components

The core accessibility support which was provided in the Java 2 Platform has been moved up the inheritance tree. This means that it is not only present in Swing components, it is also part of all lightweight AWT components.

Prior to version 1.3 of the Java 2 Platform, if a developer wished to create an accessible custom component, s/he had two options.

Now that accessibility support has been included in both AWT Component and AWT Container, the task of implementing the accessibility API on non-Swing components is easier.

It is important to note that this accessibility support has not yet been incorporated into AWTList, some portions of AWT Text, AWT Menu, and AWT Combobox/Popup Menu. In addition, further work needs to be done in areas where the modification of native code is required. For the present, the necessary API is there, but it returns a null value. It is hoped that support for "heavyweight" components will be integrated into subsequent versions of the Java 2 Platform.

Accessible Applet

This work is similar to the changes made for the AWT accessibility support described above.

AWT Robot

The AWT's new Robot class provides a way to insert keystrokes and mouse events at the system level. This feature enhances accessibility because it allows the physical on-screen mouse cursor to be moved. This enables screen magnification software for native environments to recognize and respond to mouse movements that could not previously be identified by assistive technologies outside of the virtual machine.

It is important to note that, although this improves overall accessibility, it is not a comprehensive solution. For instance, the AWT Robot does not allow native assistive technologies to track the focus or the caret.


Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: access@sun.com
Sun
Java Software