org.jminor.common.ui.valuemap
Class TristateValueLink<K>
java.lang.Object
javax.swing.AbstractAction
org.jminor.common.ui.control.Control
org.jminor.common.ui.control.AbstractValueLink<ValueChangeMapEditModel<K,V>,V>
org.jminor.common.ui.valuemap.AbstractValueMapLink<K,Object>
org.jminor.common.ui.valuemap.TristateValueLink<K>
- All Implemented Interfaces:
- ActionListener, Serializable, Cloneable, EventListener, Action
public final class TristateValueLink<K>
- extends AbstractValueMapLink<K,Object>
A class for linking a UI component to a boolean value.
- 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 |
TristateValueLink
public TristateValueLink(TristateButtonModel buttonModel,
ValueChangeMapEditModel<K,Object> editModel,
K key)
- Instantiates a new TristateValueLink.
- Parameters:
buttonModel
- the button model to linkeditModel
- the edit modelkey
- the key of the property to link
TristateValueLink
public TristateValueLink(TristateButtonModel buttonModel,
ValueChangeMapEditModel<K,Object> editModel,
K key,
LinkType linkType)
- Instantiates a new TristateValueLink.
- Parameters:
buttonModel
- the button model to linkeditModel
- the edit modelkey
- the key of the property to linklinkType
- the link type
getUIValue
protected Object getUIValue()
-
- Specified by:
getUIValue
in class AbstractValueLink<ValueChangeMapEditModel<K,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<ValueChangeMapEditModel<K,Object>,Object>
- Parameters:
value
- the value to represent in the UI