com.mtp.model
Class DocumentStringModel

java.lang.Object
  |
  +--javax.swing.text.AbstractDocument
        |
        +--javax.swing.text.PlainDocument
              |
              +--com.mtp.model.DocumentStringModel
All Implemented Interfaces:
Document, Serializable, StringModel

public class DocumentStringModel
extends PlainDocument
implements StringModel

Models a String using a PlainDocument.

Author:
Matthew Pekar
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.text.AbstractDocument
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement
 
Field Summary
protected  Listeners listeners
           
 
Fields inherited from class javax.swing.text.PlainDocument
lineLimitAttribute, tabSizeAttribute
 
Fields inherited from class javax.swing.text.AbstractDocument
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
 
Fields inherited from interface com.mtp.model.StringModel
STRING_CHANGED
 
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
 
Constructor Summary
DocumentStringModel()
           
DocumentStringModel(String s)
           
 
Method Summary
 void addListener(StringModelListener l)
           
protected  void fireChange()
           
 String getString()
           
 void removeListener(StringModelListener l)
           
 void setString(String s)
           
 
Methods inherited from class javax.swing.text.PlainDocument
createDefaultRoot, getDefaultRootElement, getParagraphElement, insertString, insertUpdate, removeUpdate
 
Methods inherited from class javax.swing.text.AbstractDocument
addDocumentListener, addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, postRemoveUpdate, putProperty, readLock, readUnlock, remove, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

protected Listeners listeners
Constructor Detail

DocumentStringModel

public DocumentStringModel()

DocumentStringModel

public DocumentStringModel(String s)
Method Detail

getString

public String getString()
Specified by:
getString in interface StringModel

setString

public void setString(String s)
Specified by:
setString in interface StringModel

addListener

public void addListener(StringModelListener l)
Specified by:
addListener in interface StringModel

removeListener

public void removeListener(StringModelListener l)
Specified by:
removeListener in interface StringModel

fireChange

protected void fireChange()


Copyright © 2002 Matthew Pekar. All Rights Reserved.