|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.base.util.DocumentUtil.PassthroughDocument
com.gargoylesoftware.base.util.DocumentUtil.LengthLimitedDocument
private static class DocumentUtil.LengthLimitedDocument
A wrapper document that prevents the user from typing more than a specified number of characters.
Field Summary | |
---|---|
private int |
maxLength_
|
Fields inherited from interface javax.swing.text.Document |
---|
StreamDescriptionProperty, TitleProperty |
Constructor Summary | |
---|---|
DocumentUtil.LengthLimitedDocument(javax.swing.text.Document document,
int maxLength)
Create an instance |
Method Summary | |
---|---|
void |
insertString(int offset,
java.lang.String string,
javax.swing.text.AttributeSet attributeSet)
|
Methods inherited from class com.gargoylesoftware.base.util.DocumentUtil.PassthroughDocument |
---|
addDocumentListener, addUndoableEditListener, createPosition, getDefaultRootElement, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, putProperty, remove, removeDocumentListener, removeUndoableEditListener, render |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int maxLength_
Constructor Detail |
---|
public DocumentUtil.LengthLimitedDocument(javax.swing.text.Document document, int maxLength)
document
- The document to wrapmaxLength
- The maximum number of characters that can be entered into this documentMethod Detail |
---|
public void insertString(int offset, java.lang.String string, javax.swing.text.AttributeSet attributeSet) throws javax.swing.text.BadLocationException
insertString
in interface javax.swing.text.Document
insertString
in class DocumentUtil.PassthroughDocument
javax.swing.text.BadLocationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |