Package limn.components
Enum Class Validation
- All Implemented Interfaces:
Serializable,Comparable<Validation>,Constable
What an application has decided about the value a control holds: nothing yet, wrong, doubtful,
accepted, or worth a note. The application decides it, in a handler or a watcher, and the
toolkit shows it: on the border of a
TextField or a TextArea, and, around any
control, a Field's border, its line under the control and what a screen reader is told.
Only ERROR reaches a reader as a state: each platform has one flag for a value that
failed validation and none for the other three, and a field that passed announced as failing
would be the wrong fact. The message a Field shows says the rest, as the control's
description.
A 1.x minor release may add constants to this enum: a switch over it needs a
default branch.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe value is refused; drawn in the theme'sdangercolour.The value carries a note; drawn in the theme'sinfocolour.Nothing has been decided, or the decision was taken back: the control draws as it rests.The value is accepted; drawn in the theme'ssuccesscolour.The value is taken with a doubt; drawn in the theme'swarningcolour. -
Method Summary
Modifier and TypeMethodDescriptionstatic ValidationReturns the enum constant of this class with the specified name.static Validation[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
Nothing has been decided, or the decision was taken back: the control draws as it rests. -
ERROR
The value is refused; drawn in the theme'sdangercolour. -
WARNING
The value is taken with a doubt; drawn in the theme'swarningcolour. -
SUCCESS
The value is accepted; drawn in the theme'ssuccesscolour. -
INFO
The value carries a note; drawn in the theme'sinfocolour.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-