private static class DocumentUtil.LengthLimitedDocument extends DocumentUtil.PassthroughDocument
| Modifier and Type | Field and Description |
|---|---|
private int |
maxLength_ |
| Constructor and Description |
|---|
LengthLimitedDocument(javax.swing.text.Document document,
int maxLength)
Create an instance
|
| Modifier and Type | Method and Description |
|---|---|
void |
insertString(int offset,
java.lang.String string,
javax.swing.text.AttributeSet attributeSet) |
addDocumentListener, addUndoableEditListener, createPosition, getDefaultRootElement, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, putProperty, remove, removeDocumentListener, removeUndoableEditListener, renderpublic LengthLimitedDocument(javax.swing.text.Document document,
int maxLength)
document - The document to wrapmaxLength - The maximum number of characters that can be entered into this documentpublic void insertString(int offset,
java.lang.String string,
javax.swing.text.AttributeSet attributeSet)
throws javax.swing.text.BadLocationException
insertString in interface javax.swing.text.DocumentinsertString in class DocumentUtil.PassthroughDocumentjavax.swing.text.BadLocationException