Sun provides several utilities that can help you discover just how accessible your JFC programs really are. These utilities are freely available and can be downloaded from the following address: http://java.sun.com/products/jfc/#download-access. Follow the instructions for downloading and installation. Six utilities are included in the download: AccessibilityMonitor, AWTMonitor, Ferret, JavaMonitor, Linker, and Monkey. The following sections provide a brief introduction to these utilities. For more information, consult the documentation that is included in the download. AccessibilityMonitorAccessibilityMonitor monitors all accessible property change events on all nontransient objects. This program automatically starts up when you run JFC programs. Before AccessibilityMonitor can be used, you must do two things:
The next time you run a JFC program, AccessibilityMonitor 's main window will be displayed. For example, if you run AccessibilityDemo1 and click its button (after checking the Accessibility PropertyChange Events checkbox), AccessibilityMonitor displays information similar to that shown in Figure 17.2. Figure 17.2. AccessibilityMonitor shows AccessibilityDemo1 's property change events.
AWTMonitorAWTMonitor is an AWT program that extracts information common to AWT and Swing components . However, Swing is not required to use AWTMonitor. This program automati cally starts up when you run JFC programs. Before AWTMonitor can be used, you must do two things:
The next time you run a JFC program, AWTMonitor 's main window will be displayed. For example, if you run AccessibilityDemo1 and move the mouse (after checking the Mouse checkbox), AWTMonitor displays information similar to that shown in Figure 17.3. Figure 17.3. AWTMonitor shows Accessibility Demo1 's mouse events.
FerretFerret tracks mouse movements, focus updates, and the movement of a caret in either a text field or a text area. This program automatically starts up when you run JFC programs. Before Ferret can be used, you must do two things:
The next time you run a JFC program, Ferret 's main window will be displayed. For example, if you run AccessibilityDemo8 (after choosing Track Caret from the Settings menu), Ferret displays caret information similar to that shown in Figure 17.4. Figure 17.4. Ferret shows Accessibility Demo8 's caret information.
JavaMonitorJavaMonitor is a Swing program that extracts all kinds of AWT and Swing information. This program automatically starts up when you run JFC programs. Before JavaMonitor can be used, you must do two things:
The next time you run a JFC program, JavaMonitor 's main window will be displayed. For example, if you run AccessibilityDemo1 and click its button (after checking the Action checkbox in the AWT Events checkbox group from JavaMonitor 's main window), JavaMonitor displays information similar to that shown in Figure 17.5. Figure 17.5. JavaMonitor shows Accessibility Demo1 's action events.
LinkerLinker captures accessible hypertext information. This program automatically starts up when you run JFC programs. Before Linker can be used, you must do two things:
The next time you run a JFC program, Linker 's main window will be displayed. For example, if you run AccessibilityDemo4, load an HTML document, and press the F1 function key while the mouse is positioned over this document, Linker displays information similar to that shown in Figure 17.6. Figure 17.6. Linker shows Accessibility Demo4 's hyperlink information.
Caution Linker is a tricky program to use. For example, during the development of this chapter section, it took several attempts to obtain the hyperlink information. For each attempt, AccessibilityDemo4 was run and F1 was pressed, until the information (shown in Figure 17.6) was obtained. To achieve the desired results, you'll have to experiment with this program. MonkeyMonkey "swings" through a JFC program's component hierarchy. The hierarchy is displayed as both a Component tree and as an Accessible tree in Monkey 's window. This program automatically starts up when you run JFC programs. Before Monkey can be used, you must do two things:
The next time you run a JFC program, Monkey 's main window will be displayed. For example, if you run AccessibilityDemo1, click the Refresh Trees menu item on Monkey 's File menu, expand the AccessibiltyDemo1 tree fully, and right-click the Press Me entry in the Accessible Tree hierarchy (selecting AccessibleAction Panel ), Monkey displays information similar to that shown in Figure 17.7. Figure 17.7. Monkey 's main window shows Accessibility Demo1 's Component and Accessible trees.
Note The small Action window appears because the AccessibleAction Panel menu item was selected from the pop-up menu that appeared when Press Me was right-clicked. |