keyFinder.js

A JavaScript tool that helps navigate the Java API documentation.

Developed and Copyright © 2002 by Steve Claflin


News! keyFinder 2.0 will be released soon, including:

Currently freeware--licensed freely for use on your own system, but not for distribution to others.

It works in Windows IE5+ and Netscape 4.7/4.8 and 6.2. I know it doesn't work on Netscape 4.x in Linux, and would assume that it does not work in other UNIX versions. I haven't tested earlier browser versions or other platforms.

After installing the script, you can:

Type a class name or the first few letters and the lower left pane (the class hyperlink listing) will scroll to that item. In general, it will jump to whatever class it has identified as first match or, failing a match, the first one after the string you typed. (There is no text box--you just start pressing keys.)
If you type enough that you have reached the class you want, you can hit enter and the right page will change to that class page.
If you hit shift-F, the right page will jump to the fields section, shift-C will jump to constructors, shift-M will jump to methods, and shift-I will jump to inner classes.
Note that this works on a timer--if you stop typing for a second it will reset. The time delay can be customized by changing the line that reads var keyTimeout = 1000; to use a different number (the number is in milliseconds, so 1000 = 1 second).
Also, sometimes you may have to wait a second or two and try again--there is additional code on a timer that refreshes the script so that the code works after switching class pages.
Also note that it currently only works on the "All Classes" listing.

To download: keyFinder.zip (contains the js file and this page).

To use it:

  1. Store it in the docs\api directory under your jdk directory
  2. Then edit the index.html file in that directory as follows:
    1. In the <HEAD> section, under the </TITLE> line, add: <script src="keyFinder.js"></script>
    2. Change the first <FRAMESET> tag to read: <FRAMESET cols="20%,80%" onLoad="init();">

Then you should be able to pull up the API index page in IE or Netscape and use the script to navigate through the class pages.


Give it a try--I'd be interested in any feedback or suggestions you might have.

Queued for development/enhancement:

  1. Ability to work with lists other than All Classes (the reason it doesn't now is that they are formatted differently, with separate categories for interfaces, classes, exceptions, and errors)
  2. Facility for adding your own notes to pages