wicket.util.convert.converters
Class DateToStringConverter

java.lang.Object
  extended by wicket.util.convert.converters.AbstractConverter
      extended by wicket.util.convert.converters.DateToStringConverter
All Implemented Interfaces:
java.io.Serializable, ITypeConverter

public final class DateToStringConverter
extends AbstractConverter

Converts from Date to String.

Author:
Eelco Hillenius
See Also:
Serialized Form

Constructor Summary
DateToStringConverter()
           
 
Method Summary
 java.lang.Object convert(java.lang.Object value, java.util.Locale locale)
          Converts the given value
 java.text.DateFormat getDateFormat(java.util.Locale locale)
           
protected  java.lang.Class getTargetType()
           
 void setDateFormat(java.util.Locale locale, java.text.DateFormat dateFormat)
           
 
Methods inherited from class wicket.util.convert.converters.AbstractConverter
newConversionException, parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateToStringConverter

public DateToStringConverter()
Method Detail

setDateFormat

public final void setDateFormat(java.util.Locale locale,
                                java.text.DateFormat dateFormat)
Parameters:
locale - The locale for this dateformat
dateFormat - The numberFormat to set.

convert

public java.lang.Object convert(java.lang.Object value,
                                java.util.Locale locale)
Description copied from interface: ITypeConverter
Converts the given value

Parameters:
value - The value to convert
Returns:
The converted value
See Also:
ITypeConverter.convert(java.lang.Object,java.util.Locale)

getDateFormat

public final java.text.DateFormat getDateFormat(java.util.Locale locale)
Parameters:
locale -
Returns:
Returns the dateFormat.

getTargetType

protected java.lang.Class getTargetType()
Specified by:
getTargetType in class AbstractConverter
Returns:
The target type of this type converter


Copyright © 2004-2007 Wicket developers. All Rights Reserved.