public class DocumentUtil extends Object
Modifier and Type | Method and Description |
---|---|
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()
Return a PlainDocument wrappered so that it accepts uppercase
input only.
|
static Document |
upperCaseDocument(Document document)
Return a wrapper document that converts all input to uppercase.
|
public static Document upperCaseDocument(Document document)
document
- The document to wrapper.public static Document upperCaseDocument()
public static Document lengthLimitedDocument(Document document, int maxLength)
document
- The document to wrapper.maxLength
- The maximum number of characters that can be placed in
this document.public static Document lengthLimitedDocument(int maxLength)
maxLength
- The maximum number of characters that can be placed in
this document.Copyright © 1998–2014 Gargoyle Software Inc.. All rights reserved.