public abstract class AbstractValidationResultModel extends com.jgoodies.common.bean.Bean implements ValidationResultModel
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.
DefaultValidationResultModel,
Serialized FormPROPERTY_ERRORS, PROPERTY_MESSAGES, PROPERTY_RESULT, PROPERTY_SEVERITY| Constructor and Description |
|---|
AbstractValidationResultModel() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
Severity |
getSeverity()
Looks up and returns the severity of the validation result,
one of error, warning, or
null. |
boolean |
hasErrors()
Checks and answers whether the validation result has errors.
|
boolean |
hasMessages()
Checks and answers whether the validation result has messages.
|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPropertyChangeSupport, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetResult, setResultpublic final Severity getSeverity()
null.getSeverity in interface ValidationResultModelValidationResultModel.hasErrors(),
ValidationResultModel.hasMessages()public final boolean hasErrors()
hasErrors in interface ValidationResultModelValidationResultModel.getSeverity(),
ValidationResultModel.hasMessages()public final boolean hasMessages()
hasMessages in interface ValidationResultModelValidationResultModel.getSeverity(),
ValidationResultModel.hasErrors()protected final void firePropertyChanges(ValidationResult oldResult, ValidationResult newResult)
oldResult - the old validation resultnewResult - the new validation resultNullPointerException - if the old or new result is nullValidationResultModel.setResult(ValidationResult),
ValidationResultModelContainer.setResult(ValidationResult)Copyright © 2003-2014 JGoodies Software GmbH. All Rights Reserved.