|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.globalmentor.beans.BoundPropertyObject
com.guiseframework.event.GuiseBoundPropertyObject
com.guiseframework.model.ui.AbstractPresentationModel
com.guiseframework.component.AbstractComponent
com.guiseframework.component.AbstractCompositeComponent
com.guiseframework.component.AbstractMultipleCompositeComponent
com.guiseframework.component.AbstractListCompositeComponent
com.guiseframework.component.AbstractLayoutComponent
com.guiseframework.component.AbstractContainer
com.guiseframework.component.AbstractContainerControl
com.guiseframework.component.AbstractContainerValueControl<V>
V - The type of value to represent.public abstract class AbstractContainerValueControl<V>
An abstract implementation of a container that is also a value control.
The component valid status is updated before a change in the ValueModel.VALUE_PROPERTY or the ValueModel.VALIDATOR_PROPERTY is fired.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.guiseframework.component.AbstractComponent |
|---|
AbstractComponent.AbstractFlyoverFrameStrategy<S extends Component>, AbstractComponent.AbstractFlyoverStrategy<S extends Component>, AbstractComponent.DefaultFlyoverStrategy<S extends Component> |
| Nested classes/interfaces inherited from interface com.guiseframework.component.Control |
|---|
Control.Status |
| Nested classes/interfaces inherited from interface com.guiseframework.component.Component |
|---|
Component.FlyoverStrategy<S extends Component> |
| Field Summary |
|---|
| Fields inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS |
| Fields inherited from interface com.guiseframework.component.ValueControl |
|---|
CONVERTER_PROPERTY |
| Fields inherited from interface com.guiseframework.component.Control |
|---|
STATUS_PROPERTY |
| Fields inherited from interface com.guiseframework.component.Component |
|---|
BOOKMARK_ENABLED_PROPERTY, CONSTRAINTS_PROPERTY, DRAG_ENABLED_PROPERTY, DROP_ENABLED_PROPERTY, FLYOVER_ENABLED_PROPERTY, FLYOVER_STRATEGY_PROPERTY, INPUT_STRATEGY_PROPERTY, NAME_PROPERTY, NOTIFICATION_PROPERTY, ORIENTATION_PROPERTY, THEME_APPLIED_PROPERTY, VALID_PROPERTY |
| Fields inherited from interface com.guiseframework.model.Displayable |
|---|
DISPLAYED_PROPERTY |
| Fields inherited from interface com.guiseframework.model.InfoModel |
|---|
DESCRIPTION_CONTENT_TYPE_PROPERTY, DESCRIPTION_PROPERTY, INFO_CONTENT_TYPE_PROPERTY, INFO_PROPERTY |
| Fields inherited from interface com.guiseframework.model.LabelModel |
|---|
GLYPH_URI_PROPERTY, LABEL_CONTENT_TYPE_PROPERTY, LABEL_PROPERTY |
| Fields inherited from interface com.guiseframework.model.Model |
|---|
PLAIN_TEXT_CONTENT_TYPE, XHTML_CONTENT_TYPE, XHTML_FRAGMENT_CONTENT_TYPE |
| Fields inherited from interface com.guiseframework.model.Enableable |
|---|
ENABLED_PROPERTY |
| Fields inherited from interface com.guiseframework.model.ValueModel |
|---|
VALIDATOR_PROPERTY, VALUE_PROPERTY |
| Fields inherited from interface com.guiseframework.component.LayoutComponent |
|---|
LAYOUT_PROPERTY, LAYOUT_THEME_APPLIED_PROPERTY |
| Constructor Summary | |
|---|---|
AbstractContainerValueControl(Layout<?> layout,
ValueModel<V> valueModel)
Layout and value model constructor. |
|
| Method Summary | ||
|---|---|---|
void |
clearValue()
Clears the value by setting the value to null, which may be invalid according to any installed validators. |
|
protected boolean |
determineValid()
Checks the state of the component for validity. |
|
protected
|
firePropertyChange(java.lang.String propertyName,
VV oldValue,
VV newValue)
Reports that a bound property has changed. |
|
V |
getDefaultValue()
|
|
Validator<V> |
getValidator()
|
|
V |
getValue()
|
|
java.lang.Class<V> |
getValueClass()
|
|
protected ValueModel<V> |
getValueModel()
|
|
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 input value. |
|
boolean |
validate()
Validates the user input of this component and all child components. |
|
void |
validateValue()
Validates the value of this model, throwing an exception if the model is not valid. |
|
| Methods inherited from class com.guiseframework.component.AbstractContainerControl |
|---|
determineStatus, getEnableable, getStatus, isEnabled, reset, setEnabled, setNotification, setStatus, updateStatus, updateValid |
| Methods inherited from class com.guiseframework.component.AbstractContainer |
|---|
add, add, add, add, add, add, add, add, clear, contains, createComponent, get, getChildComponents, indexOf, isEmpty, iterator, lastIndexOf, remove, remove, setChildren, setLayout, size |
| Methods inherited from class com.guiseframework.component.AbstractLayoutComponent |
|---|
addComponent, applyTheme, applyTheme, getLayout, isLayoutThemeApplied, removeComponent, resetTheme, setLayoutThemeApplied, updateTheme |
| Methods inherited from class com.guiseframework.component.AbstractListCompositeComponent |
|---|
addComponent, getComponentList, hasChildComponents |
| Methods inherited from class com.guiseframework.event.GuiseBoundPropertyObject |
|---|
getSession |
| Methods inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.guiseframework.component.Control |
|---|
getStatus, reset |
| Methods inherited from interface com.guiseframework.platform.DepictedObject |
|---|
depict, getDepictID, getSession, processEvent |
| Methods inherited from interface com.guiseframework.model.InfoModel |
|---|
getDescription, getDescriptionContentType, getInfo, getInfoContentType, setDescription, setDescriptionContentType, setInfo, setInfoContentType |
| Methods inherited from interface com.guiseframework.model.LabelModel |
|---|
getGlyphURI, getLabel, getLabelContentType, setGlyphURI, setLabel, setLabelContentType |
| 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 |
| Methods inherited from interface com.guiseframework.model.Enableable |
|---|
isEnabled, setEnabled |
| Methods inherited from interface com.guiseframework.component.Container |
|---|
add, add, add, add, add, add, add, clear, contains, get, indexOf, isEmpty, lastIndexOf, remove, remove, setLayout, size |
| Methods inherited from interface com.guiseframework.component.LayoutComponent |
|---|
getLayout, isLayoutThemeApplied, setLayoutThemeApplied |
| Methods inherited from interface com.guiseframework.component.CompositeComponent |
|---|
addCompositeComponentListener, getChildComponents, hasChildComponents, removeCompositeComponentListener |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Constructor Detail |
|---|
public AbstractContainerValueControl(Layout<?> layout,
ValueModel<V> valueModel)
layout - The layout definition for the container.valueModel - The component value model.
java.lang.NullPointerException - if the given layout and/or value model is null.| Method Detail |
|---|
protected ValueModel<V> getValueModel()
protected <VV> void firePropertyChange(java.lang.String propertyName,
VV oldValue,
VV newValue)
firePropertyChange in class com.globalmentor.beans.BoundPropertyObjectpropertyName - The name of the property being changed.oldValue - The old property value.newValue - The new property value.BoundPropertyObject.firePropertyChange(PropertyChangeEvent),
BoundPropertyObject.hasPropertyChangeListeners(String),
GenericPropertyChangeEvent,
GenericPropertyChangeListenerprotected boolean determineValid()
determineValid in class AbstractCompositeComponenttrue if the component and all children passes all validity tests, else false.public boolean validate()
validate in interface Componentvalidate in class AbstractCompositeComponentAbstractComponent.isValid() as a convenience.public V getDefaultValue()
getDefaultValue in interface ValueModel<V>public V getValue()
getValue in interface ValuedComponent<V>getValue in interface Valued<V>getValue in interface ValueModel<V>null if there is no input value.
public 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 ValuedComponent<V>setValue in interface Valued<V>setValue in interface ValueModel<V>newValue - The input value of the model.
java.beans.PropertyVetoException - if the provided value is not valid or the change has otherwise been vetoed.getValidator(),
ValueModel.VALUE_PROPERTYpublic void clearValue()
null, which may be invalid according to any installed validators.
No validation occurs.
clearValue in interface ValueModel<V>ValueModel.VALUE_PROPERTYpublic void resetValue()
resetValue in interface ValueModel<V>ValueModel.VALUE_PROPERTYpublic Validator<V> getValidator()
getValidator in interface ValueModel<V>null if no validator is installed.public void setValidator(Validator<V> newValidator)
setValidator in interface ValueModel<V>newValidator - The validator for this model, or null if no validator should be used.ValueModel.VALIDATOR_PROPERTYpublic boolean isValidValue()
isValidValue in interface ValueModel<V>
public void validateValue()
throws ValidationException
validateValue in interface ValueModel<V>ValidationException - if the value of this model is not valid.public java.lang.Class<V> getValueClass()
getValueClass in interface ValuedComponent<V>getValueClass in interface ValueModel<V>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||