Package com.iizigo.validator
Class ValidatorManager
java.lang.Object
com.iizigo.validator.ValidatorManager
Validator that manages several control validators on a wizard page.
- Author:
- Christopher Mindus
- Constructor SummaryConstructorsConstructorDescription- ValidatorManager- (IValidationMessage messageHandler) Creates the validation manager without a default message.- ValidatorManager- (IValidationMessage messageHandler, String defaultText) Creates the validation manager with a default message.
- Method SummaryModifier and TypeMethodDescription- void- add- (IValidator validator) Adds a validator.- booleanChecks if any input has been modified.- booleanReturns if the last validation is in error or not.- newManualValidator- (org.eclipse.swt.widgets.Control control, int location) Creates a validator for any other control with manual verification.- newValidator- (org.eclipse.swt.widgets.Button control) Creates a validator for a button in order to handle modified states.- newValidator- (org.eclipse.swt.widgets.Combo control, String descr, boolean mustBeSpecified) Creates a validator for a combo.- newValidator- (org.eclipse.swt.widgets.Spinner control, String descr, int min, int max, int value, int textLimit) Creates a validator for a spinner with a range and sets up the control.- newValidator- (org.eclipse.swt.widgets.Text control, String descr, boolean mustBeSpecified) Creates a validator for a text field.- newValidator- (org.eclipse.swt.widgets.Tree control, String descr, boolean mustBeSpecified) Creates a validator for a tree in order to handle modified states.- voidResets the modified state for all validators.- boolean- validate()Validates the entire dialog.
- Constructor Details- ValidatorManagerCreates the validation manager without a default message.- Parameters:
- messageHandler- The message handler dialog, wizard or page.
 
- ValidatorManagerCreates the validation manager with a default message.- Parameters:
- messageHandler- The message handler dialog, wizard or page.
- defaultText- Default text, can be null.
 
 
- Method Details- hasBeenModifiedpublic boolean hasBeenModified()Checks if any input has been modified.
- resetModifiedpublic void resetModified()Resets the modified state for all validators.
- isValidAndCompletepublic boolean isValidAndComplete()Returns if the last validation is in error or not.- Returns:
- true if OK (or warning), false for error or missing parameters.
 
- validatepublic boolean validate()Validates the entire dialog.- Returns:
- true if all validates OK (with possible warnings), false otherwise.
 
- addAdds a validator.
- newValidatorCreates a validator for a button in order to handle modified states.
- newValidatorpublic ControlValidator newValidator- (org.eclipse.swt.widgets.Tree control, String descr, boolean mustBeSpecified) Creates a validator for a tree in order to handle modified states.
- newValidatorpublic ControlValidator newValidator- (org.eclipse.swt.widgets.Text control, String descr, boolean mustBeSpecified) Creates a validator for a text field.
- newValidatorpublic ControlValidator newValidator- (org.eclipse.swt.widgets.Combo control, String descr, boolean mustBeSpecified) Creates a validator for a combo.
- newManualValidatorCreates a validator for any other control with manual verification.- Parameters:
- control- The control.
- location- The location: combination of e.g. SWT.TOP|SWT.LEFT.
 
- newValidatorpublic ControlValidator newValidator- (org.eclipse.swt.widgets.Spinner control, String descr, int min, int max, int value, int textLimit) Creates a validator for a spinner with a range and sets up the control.- Parameters:
- control- The spinner.
- descr- The field description.
- min- Minimum value.
- max- Maximum value.
- value- The current value.
- textLimit- The text limit.