Module is.codion.swing.common.ui
Class TextComponents
java.lang.Object
is.codion.swing.common.ui.component.text.TextComponents
A utility class for JTextComponents.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidMakes the given document convert all upper case input to lower case, supportsSizedDocumentandAbstractDocumentstatic voidmaximumLength(Document document, int maximumLength) Sets the maximum length for the given document, supportsSizedDocumentandAbstractDocument.static voidMakes the given document convert all lower case input to upper case, supportsSizedDocumentandAbstractDocument
-
Method Details
-
maximumLength
Sets the maximum length for the given document, supportsSizedDocumentandAbstractDocument. Typing beyond the maximum length is silently rejected, while a longer edit exceeding it, such as a paste or setting the text, throwsIllegalArgumentException.- Parameters:
document- the documentmaximumLength- the maximum string length
-
upperCase
Makes the given document convert all lower case input to upper case, supportsSizedDocumentandAbstractDocument- Parameters:
document- the document
-
lowerCase
Makes the given document convert all upper case input to lower case, supportsSizedDocumentandAbstractDocument- Parameters:
document- the document
-