The Accessibility Utility Classes
So far, we’ve seen how the
Accessibility APIs help make Swing and AWT
components easier to interface with assistive technologies. However,
we haven’t seen what’s available on the other side of the
contract. In reality, there are several classes that help assistive
technologies interface with the Java virtual machine on startup,
communicate with accessible friendly components, and capture and
interpret various system events. These classes are called the
accessibility utility classes. These classes
are not part of Swing; instead, they exist as a separate package,
com.sun.java.accessibility.util
, distributed by
Sun Microsystems. (You can download this package from http://java.sun.com/products/jfc/.) The
utility classes are crucial to assistive technology developers who
wish to create specialized solutions that can communicate with any
accessibility-friendly application.
Specifically, the accessibility utility classes can provide assistive technologies with:
A list of the top-level windows of all Java applications currently executing under that virtual machine
Support for locating the window that has the input focus
Support for locating the current mouse position
Registration for listening for when top-level windows appear and disappear
The ability to register listeners for and insert events into the windowing event queue
For the purposes of this chapter, we will discuss only the central classes in the Accessibility Utilities API. We begin with the class ...
Get Java Swing now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.