Class pmr.sgml.SGMLApplet
All Packages Class Hierarchy This Package Previous Next Index
Class pmr.sgml.SGMLApplet
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
|
+----pmr.simplegraph.SimpleApplet
|
+----pmr.sgml.SGMLApplet
- public class SGMLApplet
- extends SimpleApplet
- implements Helpable
simple SGMLfile viewer; acts as a SGML 'consumer' - at present only
inputNames, and URLs. Since the class manages menus, it will normally
be necessary to subclass it as a way to deal with events.
Note: this is hardcoded to accept:
- a file as argument to SGMLApplet (when run as application)
- a URL as (when run as an applet)
- Author:
- (C) P. Murray-Rust, 1996
-
helpText
-
-
inputName
-
-
inputRoot
-
-
inputUrl
-
-
lines
-
-
mytree
-
-
SGMLApplet()
-
-
SGMLApplet(String)
-
-
addHelp(String[])
-
-
createTree()
- create a Tree from the file that has just been read in
-
fileMenu(String[])
-
-
getInputRoot()
-
-
getSGMLTree()
-
-
handleEvent(Event)
- this is called when the main menu bar is activated.
-
helpMenu(String)
-
-
init()
- It creates a tree via createTree();
-
main(String[])
- this is only run when an application.
-
paint(Graphics)
-
-
readURLInput(String)
- this is only run when an applet.
-
showHelp()
- display Help
-
showMenuItem(MenuItem)
-
mytree
protected SGMLTree mytree
inputName
protected String inputName
lines
protected StringList lines
inputUrl
protected URL inputUrl
inputRoot
protected static String inputRoot
helpText
protected StringList helpText
SGMLApplet
public SGMLApplet()
SGMLApplet
public SGMLApplet(String inputName)
paint
public void paint(Graphics g)
- Overrides:
- paint in class SimpleApplet
addHelp
public void addHelp(String s[])
- Overrides:
- addHelp in class SimpleApplet
showHelp
public void showHelp()
- display Help
- Overrides:
- showHelp in class SimpleApplet
init
public void init()
- It creates a tree via createTree();
- Overrides:
- init in class SimpleApplet
readURLInput
public void readURLInput(String inputName)
- this is only run when an applet. It requires PARAM INPUTURL to
be set. It reads the lines from the input and stores them internally
createTree
public void createTree()
- create a Tree from the file that has just been read in
handleEvent
public boolean handleEvent(Event event)
- this is called when the main menu bar is activated. Quit is dealt with,
but normally this class should be subclassed as a way of dealing with
events
- Overrides:
- handleEvent in class SimpleApplet
showMenuItem
public boolean showMenuItem(MenuItem mi)
- Overrides:
- showMenuItem in class SimpleApplet
fileMenu
public boolean fileMenu(String labels[])
- Overrides:
- fileMenu in class SimpleApplet
helpMenu
public boolean helpMenu(String label)
- Overrides:
- helpMenu in class SimpleApplet
getInputRoot
public static String getInputRoot()
getSGMLTree
public SGMLTree getSGMLTree()
main
public static void main(String args[])
- this is only run when an application. Note that running the class
(e.g. java pmr.sgml.SGMLApplet ) is enough to run it. A subclass
should override everything in this routine
All Packages Class Hierarchy This Package Previous Next Index