| java.lang.Object com.jgoodies.validation.tutorial.util.TutorialUtils
TutorialUtils | final public class TutorialUtils (Code) | | Consists only of static convenience methods used throughout
the examples of the JGoodies Validation tutorial.
author: Karsten Lentzsch version: $Revision: 1.10 $ |
createDebugPropertyChangeListener | public static PropertyChangeListener createDebugPropertyChangeListener()(Code) | | Returns a listener that writes bean property changes to the console.
The log entry includes the PropertyChangeEvent's source, property name,
old value, and new value.
a debug listener that logs bean changes to the console |
getCloseAction | public static Action getCloseAction()(Code) | | Creates and returns an Action that exists the system if performed.
an Action that exists the system if performed See Also: System.exit(int) |
getErrorsResult | public static ValidationResult getErrorsResult()(Code) | | Lazily creates and returns an example ValidationResult
that contains only errors.
a ValidationResult that contains only errors |
getMixedResult | public static ValidationResult getMixedResult()(Code) | | Lazily creates and returns an example ValidationResult
that contains errors and warnings.
a ValidationResult that contains errors and warnings |
getWarningsResult | public static ValidationResult getWarningsResult()(Code) | | Lazily creates and returns an example ValidationResult
that contains only warnings.
a ValidationResult that contains only warnings |
locateOnOpticalScreenCenter | public static void locateOnOpticalScreenCenter(Component component)(Code) | | Locates the given component on the screen's center.
Parameters: component - the component to be centered |
showValidationMessage | public static void showValidationMessage(ActionEvent e, String headerText, ValidationResult validationResult)(Code) | | Opens a message dialog that shows the validation result,
things the user must fix, before the selection can change.
Parameters: headerText - the text displayed above the validation message Parameters: validationResult - the validation result to be displayed throws: IllegalArgumentException - if the validation result is empty |
|
|