SFE.GUI
Class ProgramDocument

java.lang.Object
  extended by javax.swing.text.AbstractDocument
      extended by javax.swing.text.PlainDocument
          extended by SFE.GUI.ProgramDocument
All Implemented Interfaces:
java.io.Serializable, javax.swing.text.Document

public class ProgramDocument
extends javax.swing.text.PlainDocument

ProgramDocument is a PlainDocument extended type, with some additional comfortable operations

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.text.AbstractDocument
javax.swing.text.AbstractDocument.AbstractElement, javax.swing.text.AbstractDocument.AttributeContext, javax.swing.text.AbstractDocument.BranchElement, javax.swing.text.AbstractDocument.Content, javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AbstractDocument.ElementEdit, javax.swing.text.AbstractDocument.LeafElement
 
Field Summary
 
Fields inherited from class javax.swing.text.PlainDocument
lineLimitAttribute, tabSizeAttribute
 
Fields inherited from class javax.swing.text.AbstractDocument
BidiElementName, ContentElementName, ElementNameAttribute, ParagraphElementName, SectionElementName
 
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
 
Constructor Summary
ProgramDocument()
          Create a new ProgramDocument
ProgramDocument(java.lang.String doc)
          Create a new ProgramDocument
 
Method Summary
 void appendDoc(java.lang.String doc)
          Add data to the end of the document
 boolean equals(java.lang.Object other)
          Compare documents by data
 java.lang.String getDoc()
          Get document data
 int length()
          Get document length
 void setDoc(java.lang.String doc)
          Set document data
 java.lang.String toString()
          String representation of document
 
Methods inherited from class javax.swing.text.PlainDocument
getDefaultRootElement, getParagraphElement, insertString
 
Methods inherited from class javax.swing.text.AbstractDocument
addDocumentListener, addUndoableEditListener, createPosition, dump, getAsynchronousLoadPriority, getBidiRootElement, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, putProperty, readLock, readUnlock, remove, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProgramDocument

public ProgramDocument()
Create a new ProgramDocument


ProgramDocument

public ProgramDocument(java.lang.String doc)
Create a new ProgramDocument

Parameters:
doc - Initial string to put in document
Method Detail

setDoc

public void setDoc(java.lang.String doc)
Set document data

Parameters:
doc - Data to put in document

getDoc

public java.lang.String getDoc()
Get document data

Returns:
Document in a string

appendDoc

public void appendDoc(java.lang.String doc)
Add data to the end of the document

Parameters:
doc - String to add

length

public int length()
Get document length

Returns:
Document length

equals

public boolean equals(java.lang.Object other)
Compare documents by data

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
String representation of document

Overrides:
toString in class java.lang.Object