org.jminor.common.ui.control
Class AbstractBeanValueLink

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.jminor.common.ui.control.Control
          extended by org.jminor.common.ui.control.AbstractValueLink<Object,Object>
              extended by 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

Field Summary
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
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
 
Constructor Summary
AbstractBeanValueLink(Object owner, String propertyName, Class<?> valueClass, EventObserver valueChangeEvent)
          Instantiates a new AbstractBeanValueLink.
AbstractBeanValueLink(Object owner, String propertyName, Class<?> valueClass, EventObserver valueChangeEvent, LinkType linkType)
          Instantiates a new AbstractBeanValueLink.
 
Method Summary
 Object getModelValue()
          
 String getPropertyName()
           
 void setModelValue(Object value)
          Sets the value in the model
 
Methods inherited from class org.jminor.common.ui.control.AbstractValueLink
actionPerformed, getLinkType, getUIValue, getValueOwner, setUIValue, updateModel, updateUI
 
Methods inherited from class org.jminor.common.ui.control.Control
getDescription, getEnabledState, getIcon, getMnemonic, getName, isEnabled, setDescription, setEnabled, setIcon, setKeyStroke, setMnemonic, setName
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, putValue, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBeanValueLink

public AbstractBeanValueLink(Object owner,
                             String propertyName,
                             Class<?> valueClass,
                             EventObserver valueChangeEvent)
Instantiates a new AbstractBeanValueLink.

Parameters:
owner - the value owner
propertyName - the name of the property
valueClass - the value class
valueChangeEvent - 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 owner
propertyName - the name of the property
valueClass - the value class
valueChangeEvent - an event observer notified each time the value changes
linkType - the link type
Method Detail

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