|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.common.bean.AbstractBean
com.jgoodies.validation.util.AbstractValidationResultModel
public abstract class AbstractValidationResultModel
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.
DefaultValidationResultModel
,
Serialized FormField Summary |
---|
Fields inherited from class com.jgoodies.common.bean.AbstractBean |
---|
changeSupport |
Fields inherited from interface com.jgoodies.validation.ValidationResultModel |
---|
PROPERTY_ERRORS, PROPERTY_MESSAGES, PROPERTY_RESULT, PROPERTY_SEVERITY, PROPERTYNAME_ERRORS, PROPERTYNAME_MESSAGES, PROPERTYNAME_RESULT, PROPERTYNAME_SEVERITY |
Constructor Summary | |
---|---|
AbstractValidationResultModel()
|
Method Summary | |
---|---|
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. |
Methods inherited from class com.jgoodies.common.bean.AbstractBean |
---|
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, removeVetoableChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.jgoodies.validation.ValidationResultModel |
---|
getResult, setResult |
Methods inherited from interface com.jgoodies.common.bean.ObservableBean2 |
---|
addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener |
Methods inherited from interface com.jgoodies.common.bean.ObservableBean |
---|
addPropertyChangeListener, removePropertyChangeListener |
Constructor Detail |
---|
public AbstractValidationResultModel()
Method Detail |
---|
public final Severity getSeverity()
null
.
getSeverity
in interface ValidationResultModel
ValidationResultModel.hasErrors()
,
ValidationResultModel.hasMessages()
public final boolean hasErrors()
hasErrors
in interface ValidationResultModel
ValidationResultModel.getSeverity()
,
ValidationResultModel.hasMessages()
public final boolean hasMessages()
hasMessages
in interface ValidationResultModel
ValidationResultModel.getSeverity()
,
ValidationResultModel.hasErrors()
protected final void firePropertyChanges(ValidationResult oldResult, ValidationResult newResult)
oldResult
- the old validation resultnewResult
- the new validation result
NullPointerException
- if the old or new result is null
ValidationResultModel.setResult(ValidationResult)
,
ValidationResultModelContainer.setResult(ValidationResult)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |