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 void
Makes the given document convert all upper case input to lower case, supportsSizedDocument
andAbstractDocument
static void
maximumLength
(Document document, int maximumLength) Sets the maximum length for the given document, supportsSizedDocument
andAbstractDocument
static int
static Dimension
static void
Makes the given document convert all lower case input to upper case, supportsSizedDocument
andAbstractDocument
-
Method Details
-
maximumLength
Sets the maximum length for the given document, supportsSizedDocument
andAbstractDocument
- Parameters:
document
- the documentmaximumLength
- the maximum string length
-
upperCase
Makes the given document convert all lower case input to upper case, supportsSizedDocument
andAbstractDocument
- Parameters:
document
- the document
-
lowerCase
Makes the given document convert all upper case input to lower case, supportsSizedDocument
andAbstractDocument
- Parameters:
document
- the document
-
preferredTextFieldSize
- Returns:
- the preferred size of a JTextField
-
preferredTextFieldHeight
public static int preferredTextFieldHeight()- Returns:
- the preferred height of a JTextField
-