Copies the ASCII text on the page to the clipboard.
HelpViewer is in essence a mini-browser. It correctly displays any
HTML 2.0 content. It will hyperlink directly to a file in the same
jar file given a relative address, or it can hyperlink to any page
on the web given a complete URL. Bear in mind that the linked-to page
must have content compatible with HTML 2.0, and that if your site uses
a firewall, the java environment must be set to use a proxy.
HelpViewer can be initialized with the URL of an html file, or
the name of an HTML file in the CLASSPATH. If a name is specified,
the HTML file, as well as the directory or .jar file will be determined.
The .jar file will be used as a base for further relative
links.
-
HelpViewer(String)
- Constructs a help viewer.
-
HelpViewer(URL)
- Constructs a help viewer.
-
getBase()
-
-
getHome()
-
Retrieves the current "home" setting, which is where the Help Topics button
goes when pressed.
-
getJar()
- Gets the current jar file being used.
-
main(String[])
-
-
setBase(String)
-
-
setHome(String)
-
Sets the current "home" setting, which is where the Help Topics button
goes when pressed.
-
setHome(URL)
-
Sets the current "home" setting, which is where the Help Topics button
goes when pressed.
-
showHome()
- Causes the HTML display window to retrieve and show the home URL.
-
showPage(String)
- Causes the HTML display window to retrieve and display a page.
-
showPage(URL)
- Causes the HTML display window to retrieve and show the passed-in URL.
HelpViewer
public HelpViewer(URL u)
- Constructs a help viewer. Uses the input URL as the display. Sets home base to be
the URL minus any anchor. If the URL is only a.jar file, the jar file is set for
further show pages, and nothing is shown.
- Parameters:
- the - URL to display and use as home base
HelpViewer
public HelpViewer(String strFile)
- Constructs a help viewer.
A string input is assumed to be a help resource.
A search is made of the ClassPath to find the resource.
The directory or .jar file where the resource is found
is used to find subsequent help resources.
Home is set to the resulting HTML file minus any anchor.
The .html extension may be left off, it will be automatically added,
along with locale information when the classpath is searched.
- Parameters:
- the - file Name
main
public static void main(String args[])
getHome
public String getHome()
- Retrieves the current "home" setting, which is where the Help Topics button
goes when pressed.
- Returns:
- the home URL
setHome
public void setHome(URL u)
- Sets the current "home" setting, which is where the Help Topics button
goes when pressed.
- Parameters:
- u - the URL of "home"
setHome
public void setHome(String home)
- Sets the current "home" setting, which is where the Help Topics button
goes when pressed. Must be consistent with the jar settings set in the constructor.
- Parameters:
- home - the home value.
getJar
public String getJar()
- Gets the current jar file being used.
- Returns:
- jarFile as a string
setBase
public void setBase(String base)
getBase
public String getBase()
showPage
public void showPage(URL u)
- Causes the HTML display window to retrieve and show the passed-in URL.
Does not concatenate the base value to the front of the URL.
- Parameters:
- u - the URL to be displayed.
showPage
public void showPage(String sURL)
- Causes the HTML display window to retrieve and display a page.
If the input is a complete URL, it will be retrieved and shown.
If only a File name, the input will be found in the jar file,
or in a directory in the CLASSPATH and shown.
- Parameters:
- sURL - the page to be displayed.
showHome
public void showHome()
- Causes the HTML display window to retrieve and show the home URL.
Uses the current value home value without modification.
All Packages Class Hierarchy This Package Previous Next Index