O'Reilly logo

Java Swing by Dave Wood, Marc Loy, Robert Eckstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required