com.glaivestone.javax.swing
Class PlainTextDocument

java.lang.Object
  |
  +--javax.swing.text.AbstractDocument
        |
        +--javax.swing.text.PlainDocument
              |
              +--com.glaivestone.javax.swing.PlainTextDocument
All Implemented Interfaces:
javax.swing.text.Document, java.io.Serializable
Direct Known Subclasses:
PlainTextModel, PlainTextPrintTargetDocument

public class PlainTextDocument
extends javax.swing.text.PlainDocument

A Swing document model which holds plain (un-attributed) text,

Provides convenience services to wrap some standard operations to make simple operations to get/set/append text be so for clients

Since:
GFL 1.1
Author:
Deb Lewis
See Also:
Serialized Form

Nested Class Summary
 
Nested classes 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
static boolean REPORT_IMPOSSIBLE_ERRORS
          Hack for configuring reporting to System.err about exceptions that we should never get in the first place.
 
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
PlainTextDocument()
          Creates a new plain text document.
PlainTextDocument(java.lang.String aString)
          Creates a new plain text document containing the specified text.
 
Method Summary
 void appendText(java.lang.String aString)
          Append the given text to the end of the document.
 java.lang.String getText()
          Answer the contents of the model.
 void setText(java.lang.String aString)
          Set the contents of the document to the given text.
 
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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REPORT_IMPOSSIBLE_ERRORS

public static boolean REPORT_IMPOSSIBLE_ERRORS
Hack for configuring reporting to System.err about exceptions that we should never get in the first place.

Constructor Detail

PlainTextDocument

public PlainTextDocument()
Creates a new plain text document.


PlainTextDocument

public PlainTextDocument(java.lang.String aString)
Creates a new plain text document containing the specified text.

Method Detail

appendText

public void appendText(java.lang.String aString)
Append the given text to the end of the document.


getText

public java.lang.String getText()
Answer the contents of the model.


setText

public void setText(java.lang.String aString)
Set the contents of the document to the given text.


GFL 1.1 API