com.gargoylesoftware.base.util
public class DocumentUtil extends Object
Version: $Revision: 1.4 $
| Nested Class Summary | |
|---|---|
| static class | DocumentUtil.LengthLimitedDocument
A wrapper document that prevents the user from typing more than
a specified number of characters. |
| abstract static class | DocumentUtil.PassthroughDocument
A document that merely passes all requests through to another document.
|
| Constructor Summary | |
|---|---|
| DocumentUtil()
Private constructor to prevent instantiation of this class. | |
| Method Summary | |
|---|---|
| static Document | lengthLimitedDocument(Document document, int maxLength)
Return a wrapper document that prevents the user from typing more
than a specified number of characters. |
| static Document | lengthLimitedDocument(int maxLength)
Return a PlainDocument wrappered so that it is length limited. |
| static Document | upperCaseDocument(Document document)
Return a wrapper document that converts all input to uppercase. |
| static Document | upperCaseDocument()
Return a PlainDocument wrappered so that it accepts uppercase
input only. |
Parameters: document The document to wrapper. maxLength The maximum number of characters that can be placed in this document.
Returns: The new wrapper document.
Parameters: maxLength The maximum number of characters that can be placed in this document.
Returns: The new wrapper document.
Parameters: document The document to wrapper.
Returns: The new wrapper document.
Returns: The new wrapper document.