org.jminor.common.ui.control
Class AbstractBeanValueLink
java.lang.Object
javax.swing.AbstractAction
org.jminor.common.ui.control.Control
org.jminor.common.ui.control.AbstractValueLink<Object,Object>
org.jminor.common.ui.control.AbstractBeanValueLink
- All Implemented Interfaces:
- ActionListener, Serializable, Cloneable, EventListener, Action
- Direct Known Subclasses:
- IntBeanSpinnerValueLink, SelectedItemBeanValueLink, TextBeanValueLink, ToggleBeanValueLink
public abstract class AbstractBeanValueLink
- extends AbstractValueLink<Object,Object>
A bean based implementation of the AbstractValueLink class.
- See Also:
- Serialized Form
Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
Methods inherited from class org.jminor.common.ui.control.Control |
getDescription, getEnabledState, getIcon, getMnemonic, getName, isEnabled, setDescription, setEnabled, setIcon, setKeyStroke, setMnemonic, setName |
AbstractBeanValueLink
public AbstractBeanValueLink(Object owner,
String propertyName,
Class<?> valueClass,
EventObserver valueChangeEvent)
- Instantiates a new AbstractBeanValueLink.
- Parameters:
owner
- the value ownerpropertyName
- the name of the propertyvalueClass
- the value classvalueChangeEvent
- an event observer notified each time the value changes
AbstractBeanValueLink
public AbstractBeanValueLink(Object owner,
String propertyName,
Class<?> valueClass,
EventObserver valueChangeEvent,
LinkType linkType)
- Instantiates a new AbstractBeanValueLink.
- Parameters:
owner
- the value ownerpropertyName
- the name of the propertyvalueClass
- the value classvalueChangeEvent
- an event observer notified each time the value changeslinkType
- the link type
getPropertyName
public final String getPropertyName()
- Returns:
- the name of the linked property
getModelValue
public final Object getModelValue()
-
- Specified by:
getModelValue
in class AbstractValueLink<Object,Object>
- Returns:
- the model value of the linked property
setModelValue
public final void setModelValue(Object value)
- Sets the value in the model
- Specified by:
setModelValue
in class AbstractValueLink<Object,Object>
- Parameters:
value
- the value to set for property