gov.nist.antd.java.swing
Class Help

java.lang.Object
  |
  +--gov.nist.antd.java.swing.Help

public class Help
extends java.lang.Object

This class represents the HTML based help module. This class needs JDK 1.4

 This class was developed at the National Institute of Standards and
 Technology by employees of the Federal Government in the course of
 their official duties. Pursuant to title 17 Section 105 of the United
 States Code this software is not subject to copyright protection and
 is in the public domain.
NIST assumes no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic.
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.

Author:
borchert

Field Summary
private  HTMLBrowser browser
          The browser that is used to navigate in the document.
private  java.util.Properties helpIndex
          Contains the list of help indizes.
 
Constructor Summary
Help(java.lang.String name, java.net.URL home, java.util.Properties helpIdx)
          Creates the Help file.
 
Method Summary
 void display(java.lang.String index)
          Opens the Help window and displays the specified index.
protected  void finalize()
          destroys the browser if necessary.
 java.lang.String locateIndex(java.awt.Window window)
          Determines the name of the most recent focused component.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

browser

private HTMLBrowser browser
The browser that is used to navigate in the document.


helpIndex

private java.util.Properties helpIndex
Contains the list of help indizes.

Constructor Detail

Help

public Help(java.lang.String name,
            java.net.URL home,
            java.util.Properties helpIdx)
Creates the Help file.

Parameters:
name - Title of the help window.
home - The home help page. Mostly an index page.
helpIdx - The index that points to the url that has to be displayed.
Method Detail

display

public void display(java.lang.String index)
Opens the Help window and displays the specified index.

Parameters:
index - The index that specified the help reference.

locateIndex

public java.lang.String locateIndex(java.awt.Window window)
Determines the name of the most recent focused component. If the component does not have a name it tries to get the name of the enclosing container. If no name is found the return value is null.

Parameters:
window - The window in which the index most recent focussed component is located in.
Returns:
The found index (name) of the component or null.

finalize

protected void finalize()
                 throws java.lang.Throwable
destroys the browser if necessary.

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable - An exception occurd.