|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.base.util.DocumentUtil
public class DocumentUtil
Various utility methods relating to documents.
Nested Class Summary | |
---|---|
private static class |
DocumentUtil.LengthLimitedDocument
A wrapper document that prevents the user from typing more than a specified number of characters. |
private static class |
DocumentUtil.PassthroughDocument
A document that merely passes all requests through to another document. |
Constructor Summary | |
---|---|
private |
DocumentUtil()
Private constructor to prevent instantiation of this class. |
Method Summary | |
---|---|
static javax.swing.text.Document |
lengthLimitedDocument(javax.swing.text.Document document,
int maxLength)
Return a wrapper document that prevents the user from typing more than a specified number of characters. |
static javax.swing.text.Document |
lengthLimitedDocument(int maxLength)
Return a PlainDocument wrappered so that it is length limited. |
static javax.swing.text.Document |
upperCaseDocument()
Return a PlainDocument wrappered so that it accepts uppercase input only. |
static javax.swing.text.Document |
upperCaseDocument(javax.swing.text.Document document)
Return a wrapper document that converts all input to uppercase. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
private DocumentUtil()
Method Detail |
---|
public static javax.swing.text.Document upperCaseDocument(javax.swing.text.Document document)
document
- The document to wrapper.
public static javax.swing.text.Document upperCaseDocument()
public static javax.swing.text.Document lengthLimitedDocument(javax.swing.text.Document document, int maxLength)
document
- The document to wrapper.maxLength
- The maximum number of characters that can be placed in
this document.
public static javax.swing.text.Document lengthLimitedDocument(int maxLength)
maxLength
- The maximum number of characters that can be placed in
this document.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |