The Source for Java - java.sun.com
JAVA ACCESSIBILITY
Linker Example
Version 1.2

[Home] [What are they?] [Overview of API Features] [API Reference]
[FAQ] [Examples] [Changes] [Compatibility table] [JFC Home Page]

Linker captures the Accessible hypertext information contained in the object underneath the mouse (the user the presses the F1 key), and displays a list of the the Accessible hyperlinks within that object in a table. Selecting one of the links and clicking "Activate Selected Link" will cause the hypertext object to follow the link selected (to update the display, move the mouse over the object and press F1 again).

Snap shot of Linker in action.

Preparing to Run Linker with JDK1.1:

To run AccessibilityMonitor with JDK1.1, you need to have obtained and installed JFC 1.1 with Swing 1.1 and JDK1.1.6.  In addition, you need to be using the Java Accessibility Utilities Version 1.1.

The Linker class is in the examples/Linker directory included with this release of the Java Accessibility Utilities (click here to view the source). The compiled classes of Linker are also included in the jaccess-examples.jar file includes with this release.  Before you can run Linker, you need to set up your environment appropriately by following these instructions:

  • Add the jaccess.jar and jaccess-examples.jar files to your CLASSPATH environment variable.
  • Modify your $JDKHOME/lib/awt.properties file to include the following lines:
  • AWT.EventQueueClass=com.sun.java.accessibility.util.EventQueueMonitor
    AWT.assistive_technologies=Linker
    After you follow these instructions, you should be ready to run Linker.  If you did not set up your CLASSPATH correctly you might get one of the following errors when running a JavaTM application:
    Failed loading com.sun.java.accessibility.util.EventQueueMonitor: 
    java.lang.ClassNotFoundException: 
    com.sun.java.accessibility.util.EventQueueMonitor
    Error trying to newInstance Linker java.lang.ClassNotFoundException: 
    Linker
    The first error means the jaccess.jar file is not in your CLASSPATH, and the second means the jaccess-examples.jar file is not in your CLASSPATH.

    Preparing to Run Linker with JDK1.2:

    To run Linker with JDK1.2 you need to have obtained and installed JDK1.2.  In addition, you need to be using the Java Accessibility Utilities Version 1.2.

    The Linker class is in the examples/Linker directory included with this release of the Java Accessibility Utilities (click here to view the source). Before you can run it, you need to set up your environment appropriately by following these instructions:

  • Copy jaccess.jar and jaccess-examples.jar to the $JDKHOME/jre/lib/ext directory under your JDK1.2 installation.
  • Modify (create one if it doesn't exist) your $JDKHOME/jre/lib/accessibility.properties file to include the following line:
  • assistive_technologies=Linker
    After you follow these instructions, you should be ready to run Linker.

    Running Linker with JDK1.1 or JDK1.2:

    By following the instructions above, Linker will automatically be started any time you start a Java application. For example, you can run the SwingSet demo that comes as part of the demonstration applications for Swing.

    Using Linker:

    Move your mouse over an object which contains hypertext, and press the F1 key. Linker will query the object via the AccessibleHypertext interface, and display a table containing all of the AccessibleHyperlinks within that object. Some AccessibleHyperlink objects (e.g. client-side image maps) may contain more than one link action. Selecting a link in the table and pressing "Activate Selected Link" will cause the first link action of the selected link to be activated. To cause the table to be updated to contain the new hypertext information at the followed link, press F1 again while the mouse is over the object.

    Java Logo Copyright© 1995-98 Sun Microsystems, Inc. All Rights Reserved.
    To submit comments or suggestions about Java Accessibility, please send mail to access@sun.com.

    Sun MicroSystems