org.springframework.binding.value.support
Class AbstractValueModelAdapter

java.lang.Object
  extended by org.springframework.binding.value.support.AbstractValueModelAdapter
Direct Known Subclasses:
AsYouTypeTextComponentAdapter, FocusLostTextComponentAdapter, FormattedTextFieldAdapter, PropertyAdapter, SpinnerAdapter

public abstract class AbstractValueModelAdapter
extends Object

Abstract base class for objects that adapt a value model to some other model. e.g. a GUI component.

Author:
Oliver Hutchison

Field Summary
protected static org.apache.commons.logging.Log logger
           
 
Constructor Summary
AbstractValueModelAdapter(ValueModel valueModel)
           
 
Method Summary
protected  void adaptedValueChanged(Object newValue)
          Subclasses must called this when the value being adapted has changed.
protected  ValueModel getValueModel()
           
protected  void initalizeAdaptedValue()
          Must be called to initialize the adapted value.
protected abstract  void valueModelValueChanged(Object newValue)
          Called when the value held by the value model has changes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.commons.logging.Log logger
Constructor Detail

AbstractValueModelAdapter

public AbstractValueModelAdapter(ValueModel valueModel)
Method Detail

initalizeAdaptedValue

protected void initalizeAdaptedValue()
Must be called to initialize the adapted value. Usually the last call in the constructor.


getValueModel

protected ValueModel getValueModel()

adaptedValueChanged

protected void adaptedValueChanged(Object newValue)
Subclasses must called this when the value being adapted has changed.

Parameters:
newValue - the new adapted value

valueModelValueChanged

protected abstract void valueModelValueChanged(Object newValue)
Called when the value held by the value model has changes

Parameters:
newValue - the new value held by the value model


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.