Overview of Class Library
Although presentation of a class library typically begins with its formal class
hierarchy diagram, this discussion is organized instead by functional categories. Each
class' parent class is identified (without reference to its Java package) and the class is
described as briefly as is possible. Detailed descriptions of package membership as well
as methods and variables are presented in the various Class Library sections.
Note: Classes marked with an asterisk (*) are supplied with JSite only.
Applets
- WebApplet extends Applet implements Runnable. The parent classes for
most of EarthStones' applets. Deploys an optional splash panel at startup as well as
managing optional registration-checking for evaluation copies of software.
- JSite* extends WebApplet. EarthStones' main applet. Deploys entire
website and implements the major user-interface elements: BannerPanel, FooterPanel,
GraphicPanel, DocumentPanel, and SplashPanel.
- JDoc extends WebApplet. Renders an HTML document by implementing
DocumentPanel.
- JDocViewer extends WebApplet. An enhanced version of JDoc. Implements
DocumentPanel and DocFooter.
- Banner* extends Applet. A stand-alone implementation of BannerPanel
used by HtmlWeb (EarthStones' Version 2 website).
- Footer* extends Applet. A stand-alone implementation of FooterPanel
used by HtmlWeb.
- Graphic* extends Applet implements Runnable. A stand-alone
implementation of GraphicPanel used by HtmlWeb.
- JImage extends Applet. A stand-alone implementation of the ImageBox
object.
- JText extends Applet. A stand-alone implementation of the TextBox
object.
- SelectRes extends Applet. A stand-alone implementation of features of
EarthStones' AutoResTM technology. This nonvisual utility applet determine's
viewer's screen resolution and loads a corresponding file into a specified frame.
Applications
- WebFrame extends Frame implements Runnable. The application analog to
WebApplet. In addition, provides getDocumentBase() and getParameter() methods which permit
applications to use the same underlying class library as do applets.
- JDocViewerApp extends WebFrame. This is the application version of the
JDocViewer applet. It runs as a Java console application and can be used as a mini web
browser.
Major User-Interface Elements
- BannerPanel* extends WebPanel. The banner panel at the top of
the JSite web page which identifies its content.
- FooterPanel* extends WebPanel. The footer panel at the bottom
of the JSite web page which presents user-interaction elements for navigating throughout
the web site.
- GraphicPanel* extends WebPanel. The graphic panel typically
occupying the left portion of the JSite page and displaying a graphic image. Note: This
class is now used only by the Graphic applet deployed by HtmlWeb. JSite's Web subclass
JavaWeb instead uses an instance of DocumentPanel as its user-interface graphic
panel.
- DocumentPanel extends ScrollingPanel implements Runnable. JSite's web
page uses an instance of this class as its document panel typically occupying the
right portion of the page and displaying an HTML document containing text as well as other
elements such as images, tables, and forms in a scrolling panel. JSite also employs a
second instance of this class as its left-hand graphic panel which typically
displays a large graphic image but which may be used to display an alternative HTML
document instead. DocumentPanel also implements update() methods capable of responding to
this method call from other Java objects (e.g., instances of Web or Applet) or via
javascript calls. Note: This is the only EarthStones' class that uses non core-Java
classes (i.e., classes that are not part of the java.* packages). In this case several
classes from Symantec's symantec.* packages are used.
- SplashPanel extends Panel implements Runnable. An animated sign-on
screen which runs while the rest of the application or applet is loading. Also displays
status messages for optional registration checking for evaluation copies of software.
Other User-Interface Elements I (Public Classes)
- WebPanel extends Panel implements Runnable. The parent class to many
other user-interface elements, this class is responsible for implementing EarthStones'
AutoResTM features which transparently scale all user-interface components for
the viewer's screen resolution. This is accomplished at the time the panel object is
constructed by adapting the reshap() method for selectively scaling the panel's location
and/or dimensions.
- EventManagerPanel extends WebPanel implements Runnable. This class
manages all user-action events which occur in instances of DocumentPanel and FooterPanel
(e.g., hyperlinks, hint message display upon mouse-over, form submission) which are not
entirely handled locally (e.g., ImageButton and its subclasses manage its own events).
- CardPanel* extends WebPanel. This class implements Java's CardLayout
class and allows one of a stack of alternative panels (i.e., "cards") to be
displayed by name.
- ImagePanel extends WebPanel. Reads a .GIF or .JPG image file and
displays it in the user interface.
- ImageButton* extends ImagePanel. Turns an ImagePanel into a
fully-functioning button which "depresses" when clicked and executes a
user-defined action. The user is responsible for defining the appropriate action() method
(typically done in the panel which creates the instance of ImageButton).
- WebChoice* extends Choice. Enhances Java's Choice (listbox) component
by adding the transparent scaling features found in WebPanel as well as implementing a
mouse-over hint message.
- TextPanel extends Panel. Renders a Paragraph object as a panel in the
user-interface.
- WebFont extends Font. Enhances Java's Font class by including a color
attribute and adding underline to the font style list.
Other User-Interface Elements II (Private Classes)
- DocFooter extends Panel. A private class defined by JDocViewer. Creates
some simple navigation tools.
- ViewerAppFooter extends Panel. A private class defined by
JDocViewerApp. This is the application counterpart of DocFooter.
- SectionPanel* extends CardPanel. A private class defined by
BannerPanel. Creates a stack of ImagePanel objects which identify the current section
in BannerPanel.
- ChapterPanel* extends CardPanel. A private class defined by
BannerPanel. Creates a stack of ImagePanel objects which (optionally) identify the current
chapter in BannerPanel.
- FooterCards* extends CardPanel. A private class defined by FooterPanel.
Creates a stack of EventManagerPanel objects which represent the footers defined in the Site.web
file.
- IconButton* extends CardPanel. A private class defined by FooterPanel.
Creates a stack of ImageButton objects which permit the user to move to another
chapter/section. The user is responsible for defining the appropriate behavior in this
method's action() method.
- NavigationButton* extends CardPanel. A private class defined by
FooterPanel. Creates a stack of ImageButton objects which allow the user to move to
previous/next chapter/page. The user is responsible for defining the appropriate behavior
in this method's action() method.
- NavigationChoice* extends CardPanel. A private class defined by
FooterPanel. Creates a stack of WebChoice objects (i.e., listboxes) which presents
chapter/page lists for the viewer's selection. The user is responsible for defining the
appropriate behavior in this method's action() method.
Web Site Deployment Objects
- WebSite extends Object. A never-instantiated class which provides
shared memory to facilitate inter- and intra-applet communication. Includes the indexes applets,
webs, and sites.
- Web extends Object. The class whose instances encapsulate data having
to do with the website currently deployed (e.g., user data such as browser, computing
platform, and screen resolution) and its user interface components (e.g., banner, footer,
document, etc). Subclasses of Web manage updating of the user interface.
- JavaWeb* extends Web. Manages an all-Java implementation of web site.
- HtmlWeb* extends Web. Manages a web site in which Java applets handle everything
but HTML document rendering (EarthStones Version 2 website).
Web Site Data Structure Objects
- Index extends Hashtable. Enhances Java's Hashtable class, which stores
a list of paired key-value objects and permits retrieval of the value object knowing its
key, by adding the Vector variables ids (i.e, keys) and vals to maintain the order in
which elements are added to the Index.
- NamedIndex extends Object. This class is central to EarthStone's
description of website structure and is the parent class for its Site, Section, and
Chapter classes. Each instance of NamedIndex is characterized by three crucial variables:
an id specifies one of a set of objects at a particular level of hierarchical
organization (e.g., a particular section of the website); a parent variable,
itself an instance of NamedIndex, which identifies that level's parent data structure
(e.g., to follow the previous example, the particular website of which this section is a
part); and an instance index of class Index which lists the pairs (String
childId, NamedIndex childIdx) which identify the set of lower-level elements along with
the instance of NamedIndex that describes their properties (e.g., in our example, list of
chapters along with their associated data structures). This linked, hierarchical chain of
NamedIndex objects could go on indefinitely. Practically, EarthStones' data structure
terminates it with the Page object which describes features of the page but does not
include yet another index variable which would continue the progression to yet
another level.
- Site extends NamedIndex. Defines many variables characterizing the
entire website as well as an index linking its sections to instances of the Section class.
- Section extends NamedIndex. Defines variables describing each section
together with an index linking its chapters to instances of the Chapter class.
- Chapter extends NamedIndex. Defines variables characterizing each
chapter along with an index linking its pages to instances of the Page class.
- Page extends Object. Defines variables describing each web page.
Other Web Data Objects
- Icon* extends Object. Describes a user-interface icon.
- GImage extends Object. Describes an image along with an associated
caption.
- Link extends Object. Defines a hyperlink, including href and target
variables.
- TextList extends Object. TextList
is defined for convenience in keeping track of the attributes and structure of an HTML
bulleted list (defined in the <UL> tag)
although the text data (specified in <LI> tags)
are stored as Paragraph objects.
- Hint extends TextBox. Defines a message which appear when mouse enters
certain user-interface elements (e.g., hyperlinked text, icon buttons).
HTML Document Objects I
- DocElement extends Object. The parent class for all other HTML document
objects. Characterized by link and webFont variables and implements the
functionality of the HTML <a> and <font> tags.
- TextString extends DocElement. This is the basic text object--a string
of text rendered in a single (web)font. Implements the font style tags including <b> (<strong>),
<i> (<em>),
<u>, <sub>,
and <sup> as well as the <br> tag.
- Field extends DocElement. A specialized DocElement object which
encapsulates a user-input element (e.g., text field, button) and may include a text label
as well. Implements the HTML <input> and <textarea> tags.
- Box extends DocElement. An abstract class, defines the basic text
object that is not a TextString, including embedded images and complex objects such as
tables and forms. Subclasses must implement the show() method.
- ImageBox extends Box. An image along with optional caption. Implements
and enhances the HTML <img> tag.
- TextBox extends Box. Text wrapped within a box, with optional ruling
lines above and below. A feature of HTML+ not implemented in standard HTML.
- HorizontalRule extends TextBox. A horizontal line of specified length
and color (actually a TextBox without the text). Implements the <hr> tag.
- Form extends Box. An array of user-input elements (fields). Implements
the HTML <form> tag.
- Table extends Box. An array Paragraph objects. Implements and extens
the HTML <table> tag.
HTML Document Objects II
- Paragraph extends DocElement. An array of DocElements (TextStrings
and/or Boxes). Although in a formal sense this class implements the HTML <p> tag, its role in document rendering is much bigger than
this little tag might suggest. The paragraph, as conceptualized here, is both the basic
Document element and is itself a complex collection of text and boxes. The methods of this
class, starting with flow() which is called by the Document's show() method, do the actual
under-the-hood work of getting a complex HTML document onto the viewer's screen.
- Document extends DocElement. An array of Paragraphs. This class'
methods perform the work of parsing the HTML stream and creating the DocElement objects
which make up the document.
Stream Objects
- Data extends Thread. An abstract class which encapsulates a a data
stream object, including path and source variables, and a data buffer
for storing the stream's data elements; subclasses must define its read() and/or write()
methods. Because Data is itself an extension of the Thread class, reading and writing of
the data stream occurs in its own thread of execution and thus takes full advantage of
Java's built-in multithreading features to make the processing of long streams
significantly faster.
- DataBuffer extends Vector. This class is used by Data objects to store
a data stream. It adds enumeration-like methods hasMoreElements() and nextElement() as
well as an isLoaded flag to signal that all data from some input source (i.e., a data
stream or another data buffer) has been written to the data buffer.
- Txt extends Data. Defines the read() method for interpreting a plain
text data stream along with a DataBuffer object to store the stream's data as a collection
of (CRLF-delimited) lines.
- Html extends Data. Defines the read() method for interpreting an HTML
data stream along with a DataBuffer object to store the stream's data as a collection of extended
tags: an HTML tag delimited by <...>
together with its tail--any subsequent text up to the next tag.
- HtmlTag extends Data. Reads the data buffer of a Txt or Html object,
interprets its HTML tags, and writes the results to a Document object's data buffer as a
collection of Paragraph objects. In the case of a Txt stream, each line is interpreted as
a Paragraph consisting of a single TextString. In the case of tables (i.e., a Paragraph
object whose data variable contains a Table object) a separate instance of HtmlTag is
created for faster processing.
- Doc extends Data. Reads the Document object's data buffer, renders each
Paragraph to a user-interface panel using its flow() method, and adds the panel to the
document's DocumentPanel instance.
Utility Objects
- Util extends Object. Includes various parsing and other utility
routines useful to many of EarthStones' classes.