Class TextField.Validated
- java.lang.Object
-
- io.github.jonestimd.swing.component.TextField.Validated
-
public static class TextField.Validated extends java.lang.ObjectFactory class for creating aValidatedTextField.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextField.Validatedadd(Validator<java.lang.String> validator)Add the specified validator to the text field.TextField<ValidatedTextField>configure()Create and initialize theValidatedTextField.ValidatedTextFieldget()Create and configure theValidatedTextField.TextField.Validatednumeric(java.lang.String message)Add aNumberValidator.TextField.ValidatedpositiveNumber(java.lang.String message)Add aPositiveNumberValidator.TextField.Validatedrequired(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
Validatedfactory 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
Validatedfactory 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
Validatedfactory for further configuration
-
add
public TextField.Validated add(Validator<java.lang.String> validator)
Add the specified validator to the text field.- Returns:
- this
Validatedfactory for further configuration
-
get
public ValidatedTextField get()
Create and configure theValidatedTextField.
-
configure
public TextField<ValidatedTextField> configure()
Create and initialize theValidatedTextField.- Returns:
- an instance of
TextFieldfor further configuration
-
-