cox.jmatt.java.MathTools.demo
Class NoteworthyDemo

java.lang.Object
  extended by cox.jmatt.java.MathTools.demo.NoteworthyDemo
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class NoteworthyDemo
extends java.lang.Object
implements java.awt.event.ActionListener

This class demonstrates the use of the NoteworthyParser class. Simply stated, Noteworthy allows HTML content to be embedded into and extractef from easily-readable and structured plain text lecture notes. To use this demo load or type some Noteworthy text into the TextArea and hit the '[Parse]' button. The output will be displayed on the printer and, optionall, copied to the clipboard.


Constructor Summary
NoteworthyDemo()
          Simple constructor, 'Load' button not available.
NoteworthyDemo(java.awt.Dialog pParent)
          Build around a Dialog.
NoteworthyDemo(java.awt.Frame pParent)
          Build around a Frame.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent aev)
           
 void clearContent(boolean bClear)
          Clear the parser area, if bClear is 'true'.
 java.lang.String getContent()
          Fetch the content of the parser area.
 void loadFile()
          Load a file from the FileDialog if one is defined.
 void loadFile(java.lang.String pFile)
          Load a file into the parser area.
 void parseDocument()
          Parse the document in the parser area into HTML.
 void setContent(java.lang.String pContent)
          Set the content to be parsed.
 java.awt.Panel standardGUI()
          Build and return the GUI panel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoteworthyDemo

public NoteworthyDemo()
Simple constructor, 'Load' button not available.


NoteworthyDemo

public NoteworthyDemo(java.awt.Dialog pParent)
Build around a Dialog. 'Load' button available.


NoteworthyDemo

public NoteworthyDemo(java.awt.Frame pParent)
Build around a Frame. 'Load' button available.

Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent aev)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

standardGUI

public final java.awt.Panel standardGUI()
Build and return the GUI panel.


loadFile

public void loadFile()
Load a file from the FileDialog if one is defined.


loadFile

public void loadFile(java.lang.String pFile)
Load a file into the parser area.


setContent

public void setContent(java.lang.String pContent)
Set the content to be parsed. Ignored if null or blank.


getContent

public java.lang.String getContent()
Fetch the content of the parser area.


clearContent

public void clearContent(boolean bClear)
Clear the parser area, if bClear is 'true'.


parseDocument

public void parseDocument()
Parse the document in the parser area into HTML.