|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.converter.DateConverter
public class DateConverter
Converter which converts Date to String and converts it back.
Field Summary | |
---|---|
static ConverterContext |
DATE_CONTEXT
|
static ConverterContext |
DATETIME_CONTEXT
|
static ConverterContext |
TIME_CONTEXT
|
Constructor Summary | |
---|---|
DateConverter()
Creates a DateConverter. |
Method Summary | |
---|---|
Object |
fromString(String string,
ConverterContext context)
Converts from a String to a Date. |
DateFormat |
getDefaultDatetimeFormat()
Gets DefaultDatetimeFormat to format an calendar. |
DateFormat |
getDefaultFormat()
Gets DefaultFormat to format an calendar. |
DateFormat |
getDefaultTimeFormat()
Gets DefaultTimeFormat to format an calendar. |
void |
setDefaultDatetimeFormat(DateFormat defaultDatetimeFormat)
Sets DefaultDatetimeFormat to format an calendar. |
void |
setDefaultFormat(DateFormat defaultFormat)
Sets DefaultFormat to format an calendar. |
void |
setDefaultTimeFormat(DateFormat defaultTimeFormat)
Sets DefaultTimeFormat to format an calendar. |
boolean |
supportFromString(String string,
ConverterContext context)
If it supports fromString. |
boolean |
supportToString(Object object,
ConverterContext context)
If it supports toString method. |
String |
toString(Object object,
ConverterContext context)
Converts the object to String. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ConverterContext DATETIME_CONTEXT
public static final ConverterContext TIME_CONTEXT
public static final ConverterContext DATE_CONTEXT
Constructor Detail |
---|
public DateConverter()
Method Detail |
---|
public String toString(Object object, ConverterContext context)
toString
in interface ObjectConverter
object
- the object to be convertedcontext
- the converter context.
public boolean supportToString(Object object, ConverterContext context)
ObjectConverter
supportToString
in interface ObjectConverter
object
- object to be convertedcontext
- converter context to be used
public Object fromString(String string, ConverterContext context)
fromString
in interface ObjectConverter
string
- the string to be converted.context
- the context. It could be DATETIME_CONTEXT, DATE_CONTEXT or TIME_CONTEXT.
public boolean supportFromString(String string, ConverterContext context)
ObjectConverter
supportFromString
in interface ObjectConverter
string
- the stringcontext
- context to be converted
public DateFormat getDefaultFormat()
public void setDefaultFormat(DateFormat defaultFormat)
defaultFormat
- the new default date formatpublic DateFormat getDefaultTimeFormat()
TIME_CONTEXT
.
public void setDefaultTimeFormat(DateFormat defaultTimeFormat)
TIME_CONTEXT
.
defaultTimeFormat
- the new default time formatpublic DateFormat getDefaultDatetimeFormat()
DATETIME_CONTEXT
.
public void setDefaultDatetimeFormat(DateFormat defaultDatetimeFormat)
DATETIME_CONTEXT
.
defaultDatetimeFormat
- the new defaultdatetime format
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |