public class LimitedDocument
extends javax.swing.text.PlainDocument
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| Constructor and Description |
|---|
LimitedDocument(javax.swing.text.JTextComponent c,
int limit)
Constructs a new document with the specified limit of characters
|
| Modifier and Type | Method and Description |
|---|---|
void |
insertString(int offset,
java.lang.String str,
javax.swing.text.AttributeSet a) |
getDefaultRootElement, getParagraphElementaddDocumentListener, 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, setDocumentPropertiespublic LimitedDocument(javax.swing.text.JTextComponent c,
int limit)
c - limit - public void insertString(int offset,
java.lang.String str,
javax.swing.text.AttributeSet a)
throws javax.swing.text.BadLocationException
insertString in interface javax.swing.text.DocumentinsertString in class javax.swing.text.PlainDocumentjavax.swing.text.BadLocationException