|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.swing.visuals.util.ValidationUtil
public abstract class ValidationUtil
Validation Utility functions.
Constructor Summary | |
---|---|
ValidationUtil()
|
Method Summary | |
---|---|
static JTextFieldValidator |
addJTextFieldValidator(javax.swing.JTextField textField)
Adds a validator to the JTextField, the default validator being a BoundedLong with Integer.MIN_VALUE and Integer.MAX_VALUE as its limits. |
static JTextFieldValidator |
addJTextFieldValidator(javax.swing.JTextField textField,
double minValue,
double maxValue)
Adds a validator to the JTextField, the validator being a BoundedDouble with minValue and maxValue as its limits. |
static JTextFieldValidator |
addJTextFieldValidator(javax.swing.JTextField textField,
double minValue,
double maxValue,
java.lang.String errorMessage)
Adds a validator to the JTextField, the validator being a BoundedDouble with minValue and maxValue as its limits. |
static JTextFieldValidator |
addJTextFieldValidator(javax.swing.JTextField textField,
int minValue,
int maxValue)
Adds a validator to the JTextField, the validator being a BoundedLong with minValue and maxValue as its limits. |
static JTextFieldValidator |
addJTextFieldValidator(javax.swing.JTextField textField,
int minValue,
int maxValue,
java.lang.String errorMessage)
Adds a validator to the JTextField, the validator being a BoundedLong with minValue and maxValue as its limits. |
static JTextFieldValidator |
addJTextFieldValidator(javax.swing.JTextField textField,
ValidationInterface validator)
Adds a validator to the JTextField, the validator being the instance of the ValidationInterface passed in. |
static JTextFieldValidator |
addJTextFieldValidator(javax.swing.JTextField textField,
ValidationInterface validator,
GenericErrorHandlerInterface errorHandler)
Adds a validator to the JTextField, the validator being the instance of the ValidationInterface passed in. |
static JTextFieldValidator |
addJTextFieldValidator(javax.swing.JTextField textField,
ValidationInterface validator,
java.lang.String errorMessage)
Adds a validator to the JTextField, the validator being the instance of the ValidationInterface passed in. |
static boolean |
validate(java.lang.Object obj)
Validates the value(text) in the object with the default validator being a BoundedLong with Integer.MIN_VALUE and Integer.MAX_VALUE as its limits. |
static boolean |
validate(java.lang.Object obj,
double minValue,
double maxValue)
Validates the value(text) in the object with the validator being a BoundedDouble with minValue and maxValue as its limits. |
static boolean |
validate(java.lang.Object obj,
double minValue,
double maxValue,
java.lang.String errorMessage)
Validates the value(text) in the object with the validator being a BoundedDouble with minValue and maxValue as its limits. |
static boolean |
validate(java.lang.Object obj,
int minValue,
int maxValue)
Validates the value(text) in the object with the validator being a BoundedLong with minValue and maxValue as its limits. |
static boolean |
validate(java.lang.Object obj,
int minValue,
int maxValue,
java.lang.String errorMessage)
Validates the value(text) in the object with the validator being a BoundedLong with minValue and maxValue as its limits. |
static boolean |
validate(java.lang.Object obj,
ValidationInterface validator)
Validates the value(text) in the object with the validator being the instance of ValidationInterface passed in. |
static boolean |
validate(java.lang.Object obj,
ValidationInterface validator,
GenericErrorHandlerInterface errorHandler)
Validates the value(text) in the object with the validator being the instance of ValidationInterface passed in. |
static boolean |
validate(java.lang.Object obj,
ValidationInterface validator,
java.lang.String errorMessage)
Validates the value(text) in the object with the validator being the instance of ValidationInterface passed in. |
Constructor Detail |
---|
public ValidationUtil()
Method Detail |
---|
public static JTextFieldValidator addJTextFieldValidator(javax.swing.JTextField textField)
FocusListener
and a ActionListener
and added to the JTextField to listen to the updates made to the text.
An instance of the JTextFieldValidator is returned for the user to use to add a PropertyChangeListener
to.
textField
- The JTextField to preform the validating on whenever the JTextField fires a
focusLost or actionPerformed event.BoundedLong
,
JTextField
,
GenericErrorHandlerInterface
,
ValidationInterface
,
JTextFieldValidator
public static JTextFieldValidator addJTextFieldValidator(javax.swing.JTextField textField, double minValue, double maxValue)
FocusListener
and a ActionListener
and added to the JTextField to listen to the updates made to the text.
An instance of the JTextFieldValidator is returned for the user to use to add a PropertyChangeListener
to.
textField
- The JTextField to preform the validating on whenever the JTextField fires a
focusLost or actionPerformed event.minValue
- The minimum value limit used on the validatormaxValue
- The maximum value limit used on the validator
BoundedDouble
,
JTextField
,
GenericErrorHandlerInterface
,
ValidationInterface
,
JTextFieldValidator
public static JTextFieldValidator addJTextFieldValidator(javax.swing.JTextField textField, double minValue, double maxValue, java.lang.String errorMessage)
FocusListener
and a ActionListener
and added to the JTextField to listen to the updates made to the text.
An instance of the JTextFieldValidator is returned for the user to use to add a PropertyChangeListener
to.
textField
- The JTextField to preform the validating on whenever the JTextField fires a
focusLost or actionPerformed event.minValue
- The minimum value limit used on the validatormaxValue
- The maximum value limit used on the validatorerrorMessage
- The error message to display in the error-handler, used instead of the default message
of the validator
BoundedDouble
,
JTextField
,
GenericErrorHandlerInterface
,
ValidationInterface
,
JTextFieldValidator
public static JTextFieldValidator addJTextFieldValidator(javax.swing.JTextField textField, int minValue, int maxValue)
FocusListener
and a ActionListener
and added to the JTextField to listen to the updates made to the text.
An instance of the JTextFieldValidator is returned for the user to use to add a PropertyChangeListener
to.
textField
- The JTextField to preform the validating on whenever the JTextField fires a
focusLost or actionPerformed event.minValue
- The minimum value limit used on the validatormaxValue
- The maximum value limit used on the validator
BoundedLong
,
JTextField
,
GenericErrorHandlerInterface
,
ValidationInterface
,
JTextFieldValidator
public static JTextFieldValidator addJTextFieldValidator(javax.swing.JTextField textField, int minValue, int maxValue, java.lang.String errorMessage)
FocusListener
and a ActionListener
and added to the JTextField to listen to the updates made to the text.
An instance of the JTextFieldValidator is returned for the user to use to add a PropertyChangeListener
to.
textField
- The JTextField to preform the validating on whenever the JTextField fires a
focusLost or actionPerformed event.minValue
- The minimum value limit used on the validatormaxValue
- The maximum value limit used on the validatorerrorMessage
- The error message to display in the error-handler, used instead of the default message
of the validator
BoundedLong
,
JTextField
,
GenericErrorHandlerInterface
,
ValidationInterface
,
JTextFieldValidator
public static JTextFieldValidator addJTextFieldValidator(javax.swing.JTextField textField, ValidationInterface validator)
FocusListener
and a ActionListener
and added to the JTextField to listen to the updates made to the text.
An instance of the JTextFieldValidator is returned for the user to use to add a PropertyChangeListener
to.
textField
- The JTextField to preform the validating on whenever the JTextField fires a
focusLost or actionPerformed event.validator
- The instance of ValidationInterface to preform the validating whenever the JTextField fires a
focusLost or actionPerformed event.
JTextField
,
GenericErrorHandlerInterface
,
ValidationInterface
,
JTextFieldValidator
public static JTextFieldValidator addJTextFieldValidator(javax.swing.JTextField textField, ValidationInterface validator, java.lang.String errorMessage)
FocusListener
and a ActionListener
and added to the JTextField to listen to the updates made to the text.
An instance of the JTextFieldValidator is returned for the user to use to add a PropertyChangeListener
to.
textField
- The JTextField to preform the validating on whenever the JTextField fires a
focusLost or actionPerformed event.validator
- The instance of ValidationInterface to preform the validating whenever the JTextField fires a
focusLost or actionPerformed event.errorMessage
- The error message to display in the error-handler, used instead of the default message
of the validator
JTextField
,
GenericErrorHandlerInterface
,
ValidationInterface
,
JTextFieldValidator
public static JTextFieldValidator addJTextFieldValidator(javax.swing.JTextField textField, ValidationInterface validator, GenericErrorHandlerInterface errorHandler)
FocusListener
and a ActionListener
and added to the JTextField to listen to the updates made to the text.
An instance of the JTextFieldValidator is returned for the user to use to add a PropertyChangeListener
to.
textField
- The JTextField to preform the validating on whenever the JTextField fires a
focusLost or actionPerformed event.validator
- The instance of ValidationInterface to preform the validating whenever the JTextField fires a
focusLost or actionPerformed event.errorHandler
- The error handle used to display any error messages whenever an invalid value is entered
JTextField
,
GenericErrorHandlerInterface
,
ValidationInterface
,
JTextFieldValidator
public static boolean validate(java.lang.Object obj)
obj
- The Object (which needs to be an instance of JTextComponent) to preform the validating on
BoundedLong
,
JTextComponent
,
GenericErrorHandlerInterface
,
ValidationInterface
public static boolean validate(java.lang.Object obj, double minValue, double maxValue)
obj
- The Object (which needs to be an instance of JTextComponent) to preform the validating onminValue
- The minimum value limit used on the validatormaxValue
- The maximum value limit used on the validator
BoundedDouble
,
JTextComponent
,
GenericErrorHandlerInterface
,
ValidationInterface
public static boolean validate(java.lang.Object obj, double minValue, double maxValue, java.lang.String errorMessage)
obj
- The Object (which needs to be an instance of JTextComponent) to preform the validating onminValue
- The minimum value limit used on the validatormaxValue
- The maximum value limit used on the validatorerrorMessage
- The error message to display in the error-handler, used instead of the default message
of the validator
BoundedDouble
,
JTextComponent
,
GenericErrorHandlerInterface
,
ValidationInterface
public static boolean validate(java.lang.Object obj, int minValue, int maxValue)
obj
- The Object (which needs to be an instance of JTextComponent) to preform the validating onminValue
- The minimum value limit used on the validatormaxValue
- The maximum value limit used on the validator
BoundedLong
,
JTextComponent
,
GenericErrorHandlerInterface
,
ValidationInterface
public static boolean validate(java.lang.Object obj, int minValue, int maxValue, java.lang.String errorMessage)
obj
- The Object (which needs to be an instance of JTextComponent) to preform the validating onminValue
- The minimum value limit used on the validatormaxValue
- The maximum value limit used on the validatorerrorMessage
- The error message to display in the error-handler, used instead of the default message
of the validator
BoundedLong
,
JTextComponent
,
GenericErrorHandlerInterface
,
ValidationInterface
public static boolean validate(java.lang.Object obj, ValidationInterface validator)
obj
- The Object (which needs to be an instance of JTextComponent) to preform the validating onvalidator
- The instance of ValidationInterface to preform the validating with
BoundedDouble
,
JTextComponent
,
GenericErrorHandlerInterface
,
ValidationInterface
public static boolean validate(java.lang.Object obj, ValidationInterface validator, java.lang.String errorMessage)
obj
- The Object (which needs to be an instance of JTextComponent) to preform the validating onvalidator
- The instance of ValidationInterface to preform the validating witherrorMessage
- The error message to display in the error-handler, used instead of the default message
of the validator
BoundedDouble
,
JTextComponent
,
GenericErrorHandlerInterface
,
ValidationInterface
public static boolean validate(java.lang.Object obj, ValidationInterface validator, GenericErrorHandlerInterface errorHandler)
obj
- The Object (which needs to be an instance of JTextComponent) to preform the validating onvalidator
- The instance of ValidationInterface to preform the validating witherrorHandler
- The instance of GenericErrorHandlerInterface to display the error if the value is
invalid
BoundedDouble
,
JTextComponent
,
GenericErrorHandlerInterface
,
ValidationInterface
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |