public class RangeVerifier
extends javax.swing.InputVerifier
JTextField
.
Each of the public static final RangeVerifier
instances
available, defines the valid Range
for its input.
RangeVerifier names map 1:1 to the Range
names.
If the input is considered invalid
, the
JTextField
for which the RangeVerfier is set will get a
Color.RED
background, and all its text will be selected.
Like an ordinary InputVerifier
it is called automatically
when the JTextField
it is attached to loses focus.
Range
Modifier and Type | Field and Description |
---|---|
static RangeVerifier |
FLOAT |
static RangeVerifier |
FLOAT_0_OR_POSITIVE |
static RangeVerifier |
FLOAT_0in_TO_1ex |
static RangeVerifier |
FLOAT_0in_TO_1in |
static RangeVerifier |
FLOAT_POSITIVE |
static RangeVerifier |
INT |
static RangeVerifier |
INT_0_OR_POSITIVE |
static RangeVerifier |
INT_0_OR_POSITIVE_EVEN |
static RangeVerifier |
INT_0_OR_POSITIVE_ODD |
static RangeVerifier |
INT_POSITIVE |
static RangeVerifier |
INT_POSITIVE_EVEN |
static RangeVerifier |
INT_POSITIVE_ODD |
static RangeVerifier |
VALID_GAUSSIAN_ORDER |
Modifier and Type | Method and Description |
---|---|
boolean |
verify(javax.swing.JComponent theComponent) |
public static final RangeVerifier INT_0_OR_POSITIVE
public static final RangeVerifier INT_0_OR_POSITIVE_ODD
public static final RangeVerifier INT_0_OR_POSITIVE_EVEN
public static final RangeVerifier INT_POSITIVE
public static final RangeVerifier INT_POSITIVE_ODD
public static final RangeVerifier INT_POSITIVE_EVEN
public static final RangeVerifier INT
public static final RangeVerifier FLOAT_0in_TO_1ex
public static final RangeVerifier FLOAT_0in_TO_1in
public static final RangeVerifier FLOAT_0_OR_POSITIVE
public static final RangeVerifier FLOAT_POSITIVE
public static final RangeVerifier FLOAT
public static final RangeVerifier VALID_GAUSSIAN_ORDER