Class TextField.Validated
- java.lang.Object
-
- io.github.jonestimd.swing.component.TextField.Validated
-
public static class TextField.Validated extends java.lang.Object
Factory class for creating aValidatedTextField
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextField.Validated
add(Validator<java.lang.String> validator)
Add the specified validator to the text field.TextField<ValidatedTextField>
configure()
Create and initialize theValidatedTextField
.ValidatedTextField
get()
Create and configure theValidatedTextField
.TextField.Validated
numeric(java.lang.String message)
Add aNumberValidator
.TextField.Validated
positiveNumber(java.lang.String message)
Add aPositiveNumberValidator
.TextField.Validated
required(java.lang.String message)
Add aRequiredValidator
.
-
-
-
Method Detail
-
required
public TextField.Validated required(java.lang.String message)
Add aRequiredValidator
.- Parameters:
message
- the resource key suffix for the validation error message- Returns:
- this
Validated
factory for further configuration
-
numeric
public TextField.Validated numeric(java.lang.String message)
Add aNumberValidator
.- Parameters:
message
- the resource key suffix for the validation error message- Returns:
- this
Validated
factory for further configuration
-
positiveNumber
public TextField.Validated positiveNumber(java.lang.String message)
Add aPositiveNumberValidator
.- Parameters:
message
- the resource key suffix for the validation error message- Returns:
- this
Validated
factory for further configuration
-
add
public TextField.Validated add(Validator<java.lang.String> validator)
Add the specified validator to the text field.- Returns:
- this
Validated
factory for further configuration
-
get
public ValidatedTextField get()
Create and configure theValidatedTextField
.
-
configure
public TextField<ValidatedTextField> configure()
Create and initialize theValidatedTextField
.- Returns:
- an instance of
TextField
for further configuration
-
-