org.tentackle.ui
Class FormFieldComponentDocument
java.lang.Object
javax.swing.text.AbstractDocument
javax.swing.text.PlainDocument
org.tentackle.ui.FormFieldComponentDocument
- All Implemented Interfaces:
- Serializable, Document
public class FormFieldComponentDocument
- extends PlainDocument
Document Model for FormFieldComponents.
- Author:
- harald
- See Also:
- Serialized Form
| 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 |
FormFieldComponentDocument
public FormFieldComponentDocument(FormFieldComponent field)
- Creates a document model.
- Parameters:
field - the formfield component
insertString
public void insertString(int offs,
String str,
AttributeSet a)
throws BadLocationException
- Inserts some content into the document.
Inserting content causes a write lock to be held while the
actual changes are taking place, followed by notification
to the observers on the thread that grabbed the write lock.
This method is thread safe, although most Swing methods
are not. Please see
How
to Use Threads for more information.
Verifies the input according to the component's rules.
- Specified by:
insertString in interface Document- Overrides:
insertString in class PlainDocument
- Parameters:
offs - the starting offset >= 0str - the string to insert; does nothing with null/empty stringsa - the attributes for the inserted content
- Throws:
BadLocationException - the given insert position is not a valid
position within the document- See Also:
Document.insertString(int, java.lang.String, javax.swing.text.AttributeSet)
Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de