|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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)
|
java.lang.String |
convertToString(java.lang.Object value,
java.util.Locale locale)
|
boolean |
getApplyTimeZoneDifference()
Gets whether to apply the time zone difference when interpreting dates. |
protected java.util.TimeZone |
getClientTimeZone()
Gets the client's time zone. |
org.apache.wicket.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(org.apache.wicket.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)
convertToObject
in interface org.apache.wicket.util.convert.IConverter
IConverter.convertToObject(java.lang.String,
java.util.Locale)
public java.lang.String convertToString(java.lang.Object value, java.util.Locale locale)
convertToString
in interface org.apache.wicket.util.convert.IConverter
IConverter.convertToString(java.lang.Object,
java.util.Locale)
public final boolean getApplyTimeZoneDifference()
public final org.apache.wicket.Component getComponent()
public abstract java.lang.String getDatePattern()
public final void setComponent(org.apache.wicket.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 |