|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
V - The type of value contained in the model.public interface ValueModel<V>
A model for user input of a value.
| Field Summary | |
|---|---|
static java.lang.String |
VALIDATOR_PROPERTY
The validator bound property. |
static java.lang.String |
VALUE_PROPERTY
The value bound property. |
| Fields inherited from interface com.guiseframework.model.Model |
|---|
PLAIN_TEXT_CONTENT_TYPE, XHTML_CONTENT_TYPE, XHTML_FRAGMENT_CONTENT_TYPE |
| Method Summary | |
|---|---|
void |
clearValue()
Clears the value by setting the value to null, which may be invalid according to any installed validators. |
V |
getDefaultValue()
|
Validator<V> |
getValidator()
|
V |
getValue()
|
java.lang.Class<V> |
getValueClass()
|
boolean |
isValidValue()
Determines whether the value of this model is valid. |
void |
resetValue()
Resets the value to a default value, which may be invalid according to any installed validators. |
void |
setValidator(Validator<V> newValidator)
Sets the validator. |
void |
setValue(V newValue)
Sets the new value. |
void |
validateValue()
Validates the value of this model, throwing an exception if the model is not valid. |
| Methods inherited from interface com.globalmentor.beans.PropertyBindable |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface com.globalmentor.beans.PropertyConstrainable |
|---|
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, hasVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener |
| Field Detail |
|---|
static final java.lang.String VALIDATOR_PROPERTY
static final java.lang.String VALUE_PROPERTY
| Method Detail |
|---|
V getDefaultValue()
V getValue()
getValue in interface Valued<V>null if there is no input value.
void setValue(V newValue)
throws java.beans.PropertyVetoException
equals() method.
If a validator is installed, the value will first be validated before the current value is changed.
Validation always occurs if a validator is installed, even if the value is not changing.
If the value change is vetoed by the installed validator, the validation exception will be accessible via Throwable.getCause().
setValue in interface Valued<V>newValue - The new value.
java.beans.PropertyVetoException - if the provided value is not valid or the change has otherwise been vetoed.getValidator(),
VALUE_PROPERTYvoid clearValue()
null, which may be invalid according to any installed validators.
No validation occurs.
VALUE_PROPERTYvoid resetValue()
VALUE_PROPERTYValidator<V> getValidator()
null if no validator is installed.void setValidator(Validator<V> newValidator)
newValidator - The validator for this model, or null if no validator should be used.VALIDATOR_PROPERTYboolean isValidValue()
void validateValue()
throws ValidationException
ValidationException - if the value of this model is not valid.java.lang.Class<V> getValueClass()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||