org.springframework.binding.value.swing
Class FormattedTextFieldAdapter

java.lang.Object
  extended by org.springframework.binding.value.support.AbstractValueModelAdapter
      extended by org.springframework.binding.value.swing.FormattedTextFieldAdapter
All Implemented Interfaces:
FocusListener, PropertyChangeListener, EventListener, DocumentListener

public class FormattedTextFieldAdapter
extends AbstractValueModelAdapter
implements PropertyChangeListener, DocumentListener, FocusListener

Sets the value of the value model associated with a formatted text field when the text field changes according to the value commit policy. This setter will also update the formatted text field value when the underlying value model value changes.

Author:
Oliver Hutchison, Keith Donald

Field Summary
 
Fields inherited from class org.springframework.binding.value.support.AbstractValueModelAdapter
logger
 
Constructor Summary
FormattedTextFieldAdapter(JFormattedTextField component, ValueModel valueModel, ValueCommitPolicy commitPolicy)
           
 
Method Summary
 void changedUpdate(DocumentEvent e)
           
 void focusGained(FocusEvent e)
           
 void focusLost(FocusEvent e)
           
 void insertUpdate(DocumentEvent e)
           
 void propertyChange(PropertyChangeEvent e)
           
 void removeUpdate(DocumentEvent e)
           
protected  void valueModelValueChanged(Object value)
          Called when the value held by the value model has changes
 
Methods inherited from class org.springframework.binding.value.support.AbstractValueModelAdapter
adaptedValueChanged, getValueModel, initalizeAdaptedValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormattedTextFieldAdapter

public FormattedTextFieldAdapter(JFormattedTextField component,
                                 ValueModel valueModel,
                                 ValueCommitPolicy commitPolicy)
Method Detail

valueModelValueChanged

protected void valueModelValueChanged(Object value)
Description copied from class: AbstractValueModelAdapter
Called when the value held by the value model has changes

Specified by:
valueModelValueChanged in class AbstractValueModelAdapter
Parameters:
value - the new value held by the value model

propertyChange

public void propertyChange(PropertyChangeEvent e)
Specified by:
propertyChange in interface PropertyChangeListener

insertUpdate

public void insertUpdate(DocumentEvent e)
Specified by:
insertUpdate in interface DocumentListener

removeUpdate

public void removeUpdate(DocumentEvent e)
Specified by:
removeUpdate in interface DocumentListener

changedUpdate

public void changedUpdate(DocumentEvent e)
Specified by:
changedUpdate in interface DocumentListener

focusGained

public void focusGained(FocusEvent e)
Specified by:
focusGained in interface FocusListener

focusLost

public void focusLost(FocusEvent e)
Specified by:
focusLost in interface FocusListener


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