org.apache.xbean.propertyeditor
Class DateEditor

java.lang.Object
  extended byjava.beans.PropertyEditorSupport
      extended byorg.apache.xbean.propertyeditor.AbstractConverter
          extended byorg.apache.xbean.propertyeditor.DateEditor
All Implemented Interfaces:
Converter, java.beans.PropertyEditor

public class DateEditor
extends AbstractConverter

A property editor for Date typed properties.

Version:
$Rev: 6680 $

Constructor Summary
DateEditor()
           
 
Method Summary
protected  java.lang.Object toObjectImpl(java.lang.String text)
          Convert the text value of the property into a Date object instance.
protected  java.lang.String toStringImpl(java.lang.Object value)
          Converts the supplied object to text.
 
Methods inherited from class org.apache.xbean.propertyeditor.AbstractConverter
getAsText, getType, getValue, setAsText, setValue, toObject, toString
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getTags, isPaintable, paintValue, removePropertyChangeListener, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.beans.PropertyEditor
addPropertyChangeListener, getCustomEditor, getJavaInitializationString, getTags, isPaintable, paintValue, removePropertyChangeListener, supportsCustomEditor
 

Constructor Detail

DateEditor

public DateEditor()
Method Detail

toObjectImpl

protected java.lang.Object toObjectImpl(java.lang.String text)
Convert the text value of the property into a Date object instance.

Specified by:
toObjectImpl in class AbstractConverter
Parameters:
text - the text to convert
Returns:
a Date object constructed from the property text value.
Throws:
PropertyEditorException - Unable to parse the string value into a Date.

toStringImpl

protected java.lang.String toStringImpl(java.lang.Object value)
Description copied from class: AbstractConverter
Converts the supplied object to text. The supplied object will always be an instance of the editor type, and specifically will never be null or a String (unless this is the String editor).

Overrides:
toStringImpl in class AbstractConverter
Parameters:
value - an instance of the editor type
Returns:
the text equivalent of the value


Copyright © {inceptionYear}-2006 Apache Software Foundation. All Rights Reserved.