|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jidesoft.converter.MonthNameConverter
public class MonthNameConverter
Converter which converts int to month string and converts it back.
| Field Summary | |
|---|---|
static DateFormat |
CONCISE_FORMAT
0 -> "1", 1 -> "2", ..., 11 -> "12" |
static ConverterContext |
CONTEXT
Default ConverterContext for MonthConverter. |
static DateFormat |
LONG_FORMAT
0 -> "January", 1 -> "February", ..., 11 -> "December" |
static DateFormat |
MEDIUM_FORMAT
0 -> "Jan", 1 -> "Feb", ..., 11 -> "Dec" |
static DateFormat |
SHORT_FORMAT
0 -> "01", 1 -> "02", ..., 11 -> "12" |
| Constructor Summary | |
|---|---|
MonthNameConverter()
Creates a new CalendarConverter. |
|
| Method Summary | |
|---|---|
Object |
fromString(String string,
ConverterContext context)
Converts from String to an object. |
protected Calendar |
getCalendarByMonth(int month)
|
DateFormat |
getDefaultFormat()
Gets default format to format a month. |
static void |
main(String[] args)
|
void |
setDefaultFormat(DateFormat defaultFormat)
Sets default format to format a month. |
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 from object to String based on current locale. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static ConverterContext CONTEXT
public static final DateFormat CONCISE_FORMAT
public static final DateFormat SHORT_FORMAT
public static final DateFormat MEDIUM_FORMAT
public static final DateFormat LONG_FORMAT
| Constructor Detail |
|---|
public MonthNameConverter()
| Method Detail |
|---|
public String toString(Object object,
ConverterContext context)
ObjectConverter
toString in interface ObjectConverterobject - object to be convertedcontext - converter context to be used
protected Calendar getCalendarByMonth(int month)
public boolean supportToString(Object object,
ConverterContext context)
ObjectConverter
supportToString in interface ObjectConverterobject - object to be convertedcontext - converter context to be used
public Object fromString(String string,
ConverterContext context)
ObjectConverter
fromString in interface ObjectConverterstring - the stringcontext - context to be converted
public boolean supportFromString(String string,
ConverterContext context)
ObjectConverter
supportFromString in interface ObjectConverterstring - the stringcontext - context to be converted
public DateFormat getDefaultFormat()
public void setDefaultFormat(DateFormat defaultFormat)
MEDIUM_FORMAT.
defaultFormat - the default format to format the month.public static void main(String[] args)
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||