Enum ValidationStrategy
- All Implemented Interfaces:
Serializable, Comparable<ValidationStrategy>, java.lang.constant.Constable
Determines what event on the component will trigger running validation.
For example, if validation of a text component's content involves expensive
calculation which could slow down the UI, you may want to use ON_FOCUS_LOSS;
however ON_CHANGE_OR_ACTION (reacting every time a key is typed) provides
more satisfactory user experience.
- Author:
- Tim Boudreau
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUse whatever is generally most appropriate for this componentValidate using JComponent.setInputVerifierValidate on a document change or action performed or change eventValidate when focus is lost -
Method Summary
Modifier and TypeMethodDescriptionstatic ValidationStrategyReturns the enum constant of this type with the specified name.static ValidationStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
Use whatever is generally most appropriate for this component -
ON_FOCUS_LOSS
Validate when focus is lost -
ON_CHANGE_OR_ACTION
Validate on a document change or action performed or change event -
INPUT_VERIFIER
Validate using JComponent.setInputVerifier
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-