Class jHelp.htmlHelpPanel
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jHelp.htmlHelpPanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----jHelp.htmlHelpPanel

public class htmlHelpPanel
extends Panel
A class to provide a help browser component, consisting of a scrolling text canvas, an a vertical scrollbar.

Constructor Index

 o htmlHelpPanel(Object, String)
The htmlHelpPanel class is provided for use as a browser widget.

Method Index

 o addFile(Object, String)
The addFile method permits loading additional help source files subsequent to construction.
 o goTo(String)
This method permits setting the panel explicitly to a helpfile and optionally, a location within the help file.
 o handleEvent(Event)
 o insets()
 o paint(Graphics)
 o reshape(int, int, int, int)
 o update(Graphics)

Constructors

 o htmlHelpPanel
  public htmlHelpPanel(Object instance,
                       String fileNames)
The htmlHelpPanel class is provided for use as a browser widget. It need not be explicitly instantiated when the htmlHelpFrame is used. The htmlHelpPanel constructor requires the instance of the parent container as the first argument. This is used by jHelp to determine if the class is being invoked by an applet or application. The fileNames argument is a String comprised of one or more help source file names. Where more than one help file is being loaded in the constructor, the names should be entered as a single string, with the file names delimited by a '|' character. For example
     new htmlHelpPanel(this,"help1.html|help2.html|help3.html")
Help files need not be loaded during construction, and can be added using the addFile method. They may also be loaded by activating a hyperlink, if the requested file has not already been loaded. The first file named in the fileNames argument will be the default file displayed in the browser panel, unless specified otherwise.
Parameters:
instance - the parent instance, should either be an applet or application
fileNames - a String of one or several help source files, separated by '|'
See Also:
addFile

Methods

 o insets
  public final Insets insets()
Overrides:
insets in class Container
 o paint
  public final void paint(Graphics g)
Overrides:
paint in class Component
 o update
  public final void update(Graphics g)
Overrides:
update in class Component
 o addFile
  public void addFile(Object instance,
                      String fileName)
The addFile method permits loading additional help source files subsequent to construction. However, unlike the constructor, only a single file can be specified. This method requires the instance of the parent container as the first argument. This is used by jHelp to determine if the method is being invoked within an applet or application. The fileName argument is a String comprised of a single help source file.
Parameters:
instance - the parent instance, should either be an applet or application
fileName - a String consisting of the name of one help source file.
 o handleEvent
  public final boolean handleEvent(Event e)
Overrides:
handleEvent in class Component
 o reshape
  public final void reshape(int x,
                            int y,
                            int width,
                            int height)
Overrides:
reshape in class Component
 o goTo
  public void goTo(String context)
This method permits setting the panel explicitly to a helpfile and optionally, a location within the help file. The context argument takes the same form as an HREF, such as help1.html#Usage, or simply #Usage. The latter form will attempt to find the bookmark in the currently active help file. If a context requests a file that has not been loaded, either in the constructor, or with the addFile method, then jHelp will attempt to load the requested help file.
Parameters:
context - the hyperlink to a file and/or bookmark

All Packages  Class Hierarchy  This Package  Previous  Next  Index