org.jminor.common.ui.control
Class SelectedItemBeanValueLink
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
org.jminor.common.ui.control.SelectedItemBeanValueLink
- All Implemented Interfaces:
- ActionListener, Serializable, Cloneable, EventListener, Action
public final class SelectedItemBeanValueLink
- extends AbstractBeanValueLink
Binds a JComboBox to an Object based bean property.
- 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 |
SelectedItemBeanValueLink
public SelectedItemBeanValueLink(JComboBox box,
Object owner,
String propertyName,
Class valueClass,
EventObserver valueChangeEvent)
- Instantiates a new SelectedItemBeanValueLink.
- Parameters:
box
- the combo box to link with the valueowner
- the value ownerpropertyName
- the property namevalueClass
- the value classvalueChangeEvent
- an EventObserver notified each time the value changes
SelectedItemBeanValueLink
public SelectedItemBeanValueLink(JComboBox box,
Object owner,
String propertyName,
Class valueClass,
EventObserver valueChangeEvent,
LinkType linkType)
- Instantiates a new SelectedItemBeanValueLink.
- Parameters:
box
- the combo box to link with the valueowner
- the value ownerpropertyName
- the property namevalueClass
- the value classvalueChangeEvent
- an EventObserver notified each time the value changeslinkType
- the link type
getUIValue
protected Object getUIValue()
-
- Specified by:
getUIValue
in class AbstractValueLink<Object,Object>
- Returns:
- the value according to the UI
setUIValue
protected void setUIValue(Object value)
- Sets the value in the UI
- Specified by:
setUIValue
in class AbstractValueLink<Object,Object>
- Parameters:
value
- the value to represent in the UI