Module is.codion.swing.common.ui
Class CaseDocumentFilter
java.lang.Object
javax.swing.text.DocumentFilter
is.codion.swing.common.ui.component.text.ValidationDocumentFilter<T>
is.codion.swing.common.ui.component.text.ParsingDocumentFilter<String>
is.codion.swing.common.ui.component.text.CaseDocumentFilter
A DocumentFilter implementation with automatic conversion to upper or lower case.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Specifies possible case conversions for document text.Nested classes/interfaces inherited from class javax.swing.text.DocumentFilter
DocumentFilter.FilterBypass
-
Method Summary
Modifier and TypeMethodDescriptionstatic CaseDocumentFilter
Creates a new CaseDocumentFilter instance, configured withCaseDocumentFilter.DocumentCase.NONE
setDocumentCase
(CaseDocumentFilter.DocumentCase documentCase) protected String
Perform any required transformation of the string, the resulting string must be of the same length as the original string.Methods inherited from class is.codion.swing.common.ui.component.text.ParsingDocumentFilter
insertString, remove, replace
Methods inherited from class is.codion.swing.common.ui.component.text.ValidationDocumentFilter
addValidator, validate, validators
-
Method Details
-
setDocumentCase
- Parameters:
documentCase
- the document case setting- Returns:
- this CaseDocumentFilter instance
-
getDocumentCase
- Returns:
- the document case setting
-
caseDocumentFilter
Creates a new CaseDocumentFilter instance, configured withCaseDocumentFilter.DocumentCase.NONE
- Returns:
- a new CaseDocumentFilter instance
-
transform
Description copied from class:ParsingDocumentFilter
Perform any required transformation of the string, the resulting string must be of the same length as the original string. Returns the string unchanged by default.- Overrides:
transform
in classParsingDocumentFilter<String>
- Parameters:
string
- the string to transform- Returns:
- the transformed string
-