|
|||||||||
| 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.AbstractControl
com.guiseframework.component.AbstractActionControl
com.guiseframework.component.AbstractActionValueControl<V>
V - The type of value the control represents.public abstract class AbstractActionValueControl<V>
Abstract implementation of an action control containing a value.
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 |
| 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.ActionValueControl |
|---|
VALUE_GLYPH_URI_PROPERTY |
| Fields inherited from interface com.guiseframework.component.ActionControl |
|---|
ROLLOVER_PROPERTY |
| 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.model.Enableable |
|---|
ENABLED_PROPERTY |
| Fields inherited from interface com.guiseframework.model.ValueModel |
|---|
VALIDATOR_PROPERTY, VALUE_PROPERTY |
| Fields inherited from interface com.guiseframework.component.LabelDisplayableComponent |
|---|
ICON_DISPLAYED_PROPERTY, LABEL_DISPLAYED_PROPERTY |
| Constructor Summary | |
|---|---|
AbstractActionValueControl(InfoModel infoModel,
ActionModel actionModel,
ValueModel<V> valueModel,
Enableable enableable)
Info model, action model, value model, and enableable object 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()
|
|
java.net.URI |
getValueGlyphURI(V value)
Retrieves the icon associated with a given value. |
|
protected ValueModel<V> |
getValueModel()
|
|
boolean |
isValidValue()
Determines whether the value of this model is valid. |
|
void |
reset()
Resets the control to its default value. |
|
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. |
|
void |
setValueGlyphURI(V value,
java.net.URI newValueIcon)
Sets the URI of the icon associated with a value. |
|
boolean |
validate()
Validates the user interface 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.AbstractActionControl |
|---|
addActionListener, fireActionPerformed, fireActionPerformed, getActionListeners, getActionModel, isIconDisplayed, isLabelDisplayed, isRollover, performAction, performAction, removeActionListener, setIconDisplayed, setLabelDisplayed, setRollover |
| Methods inherited from class com.guiseframework.component.AbstractControl |
|---|
determineStatus, getEnableable, getStatus, isEnabled, setEnabled, setNotification, setStatus, updateStatus, updateValid |
| 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.ActionControl |
|---|
isRollover, setRollover |
| Methods inherited from interface com.guiseframework.model.ActionModel |
|---|
getActionListeners, performAction, performAction |
| Methods inherited from interface com.guiseframework.event.ActionListenable |
|---|
addActionListener, removeActionListener |
| Methods inherited from interface com.guiseframework.component.Control |
|---|
getStatus |
| Methods inherited from interface com.guiseframework.model.Enableable |
|---|
isEnabled, setEnabled |
| Constructor Detail |
|---|
public AbstractActionValueControl(InfoModel infoModel,
ActionModel actionModel,
ValueModel<V> valueModel,
Enableable enableable)
infoModel - The component info model.actionModel - The component action model.valueModel - The component value model.enableable - The enableable object in which to store enabled status.
java.lang.NullPointerException - if the given info model, action model, and/or enableable object is null.| Method Detail |
|---|
protected ValueModel<V> getValueModel()
public java.net.URI getValueGlyphURI(V value)
getValueGlyphURI in interface ActionValueControl<V>value - The value for which an associated icon should be returned, or null to retrieve the icon associated with the null value.
null if the value has no associated icon URI.
public void setValueGlyphURI(V value,
java.net.URI newValueIcon)
setValueGlyphURI in interface ActionValueControl<V>value - The value with which the icon should be associated, or null if the icon should be associated with the null value.newValueIcon - The new URI of the value icon, which may be a resource URI.ActionValueControl.VALUE_GLYPH_URI_PROPERTY
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 AbstractComponenttrue if the component and all children passes all validity tests, else false.public boolean validate()
validate in interface Componentvalidate in class AbstractComponentAbstractComponent.isValid() as a convenience.public void reset()
reset in interface Controlreset in class AbstractControlresetValue()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 | ||||||||