org.jfree.ui
public class LengthLimitingDocument extends PlainDocument
Constructor Summary | |
---|---|
LengthLimitingDocument()
Creates a new LengthLimitingDocument, with no limitation. | |
LengthLimitingDocument(int maxlen)
Creates a new LengthLimitingDocument with the given limitation. |
Method Summary | |
---|---|
int | getMaxLength()
Returns the defined maximum number characters for this document. |
void | insertString(int offs, String str, AttributeSet a)
Inserts the string into the document. |
void | setMaxLength(int maxlen)
Sets the maximum number of characters for this document. |
Parameters: maxlen the maximum number of elements in this document
Returns: the maximum number of characters
Parameters: offs the offset, where the string should be inserted into the document str the string that should be inserted a the attribute set assigned for the document
Throws: javax.swing.text.BadLocationException if the offset is not correct
Parameters: maxlen the maximum number of characters in this document.