|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.datetime.DateConverter
public abstract class DateConverter
Base class for Joda Time based date converters. It contains the logic to parse and format, optionally taking the time zone difference between clients and the server into account.
Converters of this class are best suited for per-component use.
Constructor Summary | |
---|---|
DateConverter(boolean applyTimeZoneDifference)
Construct. |
Method Summary | |
---|---|
java.lang.Object |
convertToObject(java.lang.String value,
java.util.Locale locale)
Converts the given String value |
java.lang.String |
convertToString(java.lang.Object value,
java.util.Locale locale)
Converts the given value to a string. |
boolean |
getApplyTimeZoneDifference()
Gets whether to apply the time zone difference when interpreting dates. |
protected java.util.TimeZone |
getClientTimeZone()
Gets the client's time zone. |
Component |
getComponent()
|
abstract java.lang.String |
getDatePattern()
|
protected abstract org.joda.time.format.DateTimeFormatter |
getFormat()
|
protected java.util.Locale |
getLocale()
Gets the locale to use. |
protected org.joda.time.DateTimeZone |
getTimeZone()
Gets the server time zone. |
void |
setComponent(Component component)
Sets component for getting the locale |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DateConverter(boolean applyTimeZoneDifference)
applyTimeZoneDifference
- whether to apply the difference in time zones between client and serverMethod Detail |
---|
public java.lang.Object convertToObject(java.lang.String value, java.util.Locale locale)
IConverter
String
value
convertToObject
in interface IConverter
value
- The string value to convertlocale
- The locale used to convert the value
IConverter.convertToObject(java.lang.String,
java.util.Locale)
public java.lang.String convertToString(java.lang.Object value, java.util.Locale locale)
IConverter
convertToString
in interface IConverter
value
- The value to convertlocale
- The locale used to convert the value
IConverter.convertToString(java.lang.Object,
java.util.Locale)
public final boolean getApplyTimeZoneDifference()
public final Component getComponent()
public abstract java.lang.String getDatePattern()
public final void setComponent(Component component)
component
- optional component to use for determining the locale.protected java.util.TimeZone getClientTimeZone()
protected abstract org.joda.time.format.DateTimeFormatter getFormat()
protected java.util.Locale getLocale()
protected org.joda.time.DateTimeZone getTimeZone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |