org.springframework.binding.format.support
Class PropertyEditorFormatter

java.lang.Object
  extended by org.springframework.binding.format.support.AbstractFormatter
      extended by org.springframework.binding.format.support.PropertyEditorFormatter
All Implemented Interfaces:
Formatter

public class PropertyEditorFormatter
extends AbstractFormatter

Adapts a property editor to the formatter interface.

Author:
Keith Donald

Constructor Summary
PropertyEditorFormatter(java.beans.PropertyEditor propertyEditor)
          Wrap given property editor in a formatter.
 
Method Summary
protected  java.lang.String doFormatValue(java.lang.Object value)
          Template method subclasses should override to encapsulate formatting logic.
protected  java.lang.Object doParseValue(java.lang.String formattedValue, java.lang.Class targetClass)
          Template method subclasses should override to encapsulate parsing logic.
 java.beans.PropertyEditor getPropertyEditor()
          Returns the wrapped property editor.
 
Methods inherited from class org.springframework.binding.format.support.AbstractFormatter
formatValue, getEmptyFormattedValue, getEmptyValue, getExpectedFormat, isAllowEmpty, isEmpty, parseValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyEditorFormatter

public PropertyEditorFormatter(java.beans.PropertyEditor propertyEditor)
Wrap given property editor in a formatter.

Method Detail

getPropertyEditor

public java.beans.PropertyEditor getPropertyEditor()
Returns the wrapped property editor.


doFormatValue

protected java.lang.String doFormatValue(java.lang.Object value)
Description copied from class: AbstractFormatter
Template method subclasses should override to encapsulate formatting logic.

Specified by:
doFormatValue in class AbstractFormatter
Parameters:
value - the value to format
Returns:
the formatted string representation

doParseValue

protected java.lang.Object doParseValue(java.lang.String formattedValue,
                                        java.lang.Class targetClass)
Description copied from class: AbstractFormatter
Template method subclasses should override to encapsulate parsing logic.

Specified by:
doParseValue in class AbstractFormatter
Parameters:
formattedValue - the formatted string to parse
Returns:
the parsed value


Copyright � 2004-2007. All Rights Reserved.