Oracle® Java Access Bridge Installation and Application Developer's Guide Release 2.0.2 for Microsoft Windows (32-Bit and 64-Bit) |
|
Previous |
Next |
The Java Ferret example uses the Java Accessibility Utilities API to examine accessible information about the objects in the Java Virtual Machine. It enables you to select different methods for selecting the object to be examined:
When any number of events occur such as change of focus, mouse movement, property change, menu selection, and displaying the popup menu
When you press the F1 key when the pointer is over an object or F2 when the mouse is over a window
Once an object has been selected for examination, Java Ferret displays the results of calling Java Accessibility API methods on that object.
The following topics are covered:
After installing and configuring Java Access Bridge, any time you launch a Java application or applet, Java Access Bridge is automatically launched as well.
To use Java Ferret, launch the Java Ferret Windows application after launching a Java application. For example, to launch Java Ferret with the SwingSet2 demo Swing program, follow these steps:
Run the Java application %JAVAHOME%\demo\jfc\SwingSet2\SwingSet2.jar
, where %JAVAHOME%
is where you installed the JDK or JRE.
Run one of the following Windows applications, depending on how you installed and configured Java Access Bridge, where %JABHOME%
is the directory in which you extracted the files for Java Access Bridge:
64-bit Windows:
%JABHOME%\JavaFerret-64.exe
: Tests Java Access Bridge as if it were a 64-bit Assistive Technology application
%JABHOME%\JavaFerret-32.exe
: Tests Java Access Bridge as if it were a 32-bit Assistive Technology application
32-bit Windows (legacy):
%JABHOME%\JavaFerret.exe
You now have two windows open: The SwingSet2 demo Java application window, and the Java Ferret window. Java Ferret has three menus: UpdateSettings, JavaEvents, and AccessibilityEvents. The items in these menus allow you to query Java applications in a variety of ways.
This section covers the available options in the UpdateSettings menu.
Determines the x- and y-coordinates of the mouse (assuming the Java Ferret window is topmost) when the mouse has stopped moving, and then queries the Java Access Bridge for the accessible object underneath the mouse, dumping the output into the scrolling window.
This section covers the available options in the JavaEvents menu.
Register with the Java Access Bridge all Java Mouse Entered events, and upon receiving one, query the object which was entered by the mouse and dump the output into the scrolling window.
Note: If the mouse is moved quickly, there may be some delay before the displayed information is updated. |
Register with Java Access Bridge all Java Focus Gained events, and upon receiving one, query the object which received the focus and dump the output into the scrolling window.
Register with Java Access Bridge all Java Caret Update events, and upon receiving one, query the object in which the caret was updated, and dump the output into the scrolling window.
Note: Since objects that contain carets are virtually by definition objects which are rich text objects, this won't seem as responsive as the other event tracking options. In real use, one would make fewer calls of Java Access Bridge in Caret Update situations (for example, just get the new letter, word, sentence at the caret location), which would be significantly faster. |
Register with Java Access Bridge all Menu events, and upon receiving one, query the object in which the caret was updated, and dump the output into the scrolling window.
This section covers the available options in the AccessibilityEvents menu.
Note: The options listed in the AccessibilityEvents menu are the most important for testing applications, especially for Assistive Technology applications. |
Register with Java Access Bridge all Java Property Changed events specifically on accessible objects in which the Name property has changed, and upon receiving one, dump the output into the scrolling window, along with information about the property that changed.
Register with Java Access Bridge for all Java Property Changed events specifically on Accessible objects in which the Description property has changed, and upon receiving one, dump the output into the scrolling window, along with information about the property that changed.
Register with Java Access Bridge all Java Property Changed events specifically on accessible objects in which the State property has changed, and upon receiving one, dump the output into the scrolling window, along with information about the property that changed.
Register with Java Access Bridge all Java Property Changed events specifically on accessible objects in which the Value property has changed, and upon receiving one, dump the output into the scrolling window, along with information about the property that changed.
Register with Java Access Bridge all Java Property Changed events specifically on accessible objects in which the Selection property has changed, and upon receiving one, dump the output into the scrolling window, along with information about the property that changed.
Register with Java Access Bridge all Java Property Changed events specifically on Accessible objects in which the Text property has changed, and upon receiving one, dump the output into the scrolling window, along with information about the property that changed.
Register with Java Access Bridge all Java Property Changed events specifically on accessible objects in which the Caret property has changed, and upon receiving one, dump the output into the scrolling window, along with information about the property that changed.
Register with Java Access Bridge all Java Property Changed events specifically on accessible objects in which the VisibleData property has changed, and upon receiving one, dump the output into the scrolling window, along with information about the property that changed.
Register with Java Access Bridge all Java Property Changed events specifically on accessible objects in which the Child property has changed, and upon receiving one, dump the output into the scrolling window, along with information about the property that changed.
Register with Java Access Bridge all Java Property Changed events specifically on accessible objects in which the ActiveDescendent property has changed, and upon receiving one, dump the output into the scrolling window, along with information about the property that changed.
Register with Java Access Bridge all Property Changed events specifically on accessible objects in which the TableModelChange property has changed, and upon receiving one, dump the output into the scrolling window, along with information about the property that changed.