| java.lang.Object com.jgoodies.validation.util.AbstractValidationResultModel
All known Subclasses: com.jgoodies.validation.extras.DelayedValidationResultModel, com.jgoodies.validation.util.DefaultValidationResultModel,
AbstractValidationResultModel | abstract public class AbstractValidationResultModel implements ValidationResultModel(Code) | | An abstract class that minimizes the effort required to implement
the
ValidationResultModel interface. It provides a property
change support
behavior to add and remove methods
to convert boolean, double, float, int, and long to their
corresponding Object values.
Subclasses must implement getResult() and
setResult(ValidationResult) to get and set
the observable validation result. #getResult always returns a
non-null result, #setResult accepts only non-null results.
author: Karsten Lentzsch version: $Revision: 1.6 $ See Also: com.jgoodies.validation.util.DefaultValidationResultModel since: 1.0.1 |
Method Summary | |
final public synchronized void | addPropertyChangeListener(PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list. | final public synchronized void | addPropertyChangeListener(String propertyName, PropertyChangeListener listener) Adds a PropertyChangeListener to the listener list for a specific
property. | final protected void | firePropertyChange(String propertyName, Object oldValue, Object newValue) Support for reporting bound property changes for Object properties. | final protected void | firePropertyChange(String propertyName, boolean oldValue, boolean newValue) Support for reporting bound property changes for boolean properties. | final protected void | firePropertyChanges(ValidationResult oldResult, ValidationResult newResult) Notifies all registered listeners about changes of the result itself
and the properties for severity, errors and messages. | final public synchronized PropertyChangeListener[] | getPropertyChangeListeners() Returns an array of all the property change listeners
registered on this component. | final public synchronized PropertyChangeListener[] | getPropertyChangeListeners(String propertyName) Returns an array of all the listeners which have been associated
with the named property. | final public Severity | getSeverity() Looks up and returns the severity of the validation result,
one of error, warning, or null . | final public boolean | hasErrors() Checks and answers whether the validation result has errors. | final public boolean | hasMessages() Checks and answers whether the validation result has messages. | final public synchronized void | removePropertyChangeListener(PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list. | final public synchronized void | removePropertyChangeListener(String propertyName, PropertyChangeListener listener) Removes a PropertyChangeListener from the listener list for a specific
property. |
firePropertyChange | final protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)(Code) | | Support for reporting bound property changes for Object properties.
This method can be called when a bound property has changed and it will
send the appropriate PropertyChangeEvent to any registered
PropertyChangeListeners.
Parameters: propertyName - the property whose value has changed Parameters: oldValue - the property's previous value Parameters: newValue - the property's new value |
firePropertyChange | final protected void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)(Code) | | Support for reporting bound property changes for boolean properties.
This method can be called when a bound property has changed and it will
send the appropriate PropertyChangeEvent to any registered
PropertyChangeListeners.
Parameters: propertyName - the property whose value has changed Parameters: oldValue - the property's previous value Parameters: newValue - the property's new value |
getSeverity | final public Severity getSeverity()(Code) | | Looks up and returns the severity of the validation result,
one of error, warning, or null .
the severity of the validation result |
hasErrors | final public boolean hasErrors()(Code) | | Checks and answers whether the validation result has errors.
true if the validation result has errors, false otherwise |
hasMessages | final public boolean hasMessages()(Code) | | Checks and answers whether the validation result has messages.
true if the validation result has messages, false otherwise |
|
|