fwpUtil
Class HTMLviewer


public class HTMLviewer
extends javax.swing.JDialog
Title: A basic HTML viewer.

Description: This code displays a basic HTML viewer with a vertical scroll bar. It does not support hyperlinks and other more advanced features. Its purpose is to display small to modest size html help files from within an application program.

Copyright: Copyright (c) 2011

Company: This code is placed in the public domain for un-restricted use. The user is totally responsible for verifying the correct operation of the code, or adapted code, in their application.

Version:
1.0
Author:
Fred Pospeschil

NOTE: This JavaDoc file was post processed with Microsoft FrontPage and regenerating the file will cause the graphics and format changes to be lost.

Constructor Detail

HTMLviewer

public HTMLviewer(java.lang.String filePath,
                  java.lang.String fileName)
A basic viewer for disk based HTML files which does not support hypertext links. The constructor concatinates the string "file:" in front of the filePath + fileName strings to form the URL which is used to load the HTML file. As a result, this routine can only be used for loading files from local/network disks. It's intended purpose is for viewinglocal disk based help files.

The filePath\fileName string is displayed in the Dialog title bar.

When building the filePath string, suggest using:
filePath = System.getProperty("user.dir") +"\\";
or
filePath = System.getProperty("user.dir") + System.getProperty("file.separator");

A valid URL would be file:c:\MicroMap\MicorMapLog.html

Parameters:
filePath - The full path to the HTML file ending with a file seperator.

fileName - The full file name with .html or .htm extension

Method Detail

toString

public java.lang.String toString()
Returns the name of the class.
Returns:
The name of the class - HTMLviewer plus the path and file name of the HTMLviewer help file.