|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.binding.format.support.AbstractFormatterFactory
public abstract class AbstractFormatterFactory
Base class for formatter factories. Manages the locale used by the produced formatters using Spring's
LocaleContext system.
| Constructor Summary | |
|---|---|
AbstractFormatterFactory()
|
|
| Method Summary | |
|---|---|
Formatter |
getDateFormatter()
Returns the default date format for the current locale. |
Formatter |
getDateTimeFormatter()
Returns the default date/time format for the current locale. |
protected Style |
getDefaultDateStyle()
Returns the default date style. |
Style |
getDefaultTimeStyle()
Returns the default time style. |
protected java.util.Locale |
getLocale()
Returns the locale in use. |
Formatter |
getTimeFormatter()
Returns the default time format for the current locale. |
void |
setDefaultDateStyle(Style defaultDateStyle)
Set the default date style. |
void |
setDefaultTimeStyle(Style defaultTimeStyle)
Set the default time style. |
void |
setLocaleContext(org.springframework.context.i18n.LocaleContext localeContext)
Sets the locale context used. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.springframework.binding.format.FormatterFactory |
|---|
getCurrencyFormatter, getDateFormatter, getDateFormatter, getDateTimeFormatter, getNumberFormatter, getPercentFormatter, getTimeFormatter |
| Constructor Detail |
|---|
public AbstractFormatterFactory()
| Method Detail |
|---|
public void setLocaleContext(org.springframework.context.i18n.LocaleContext localeContext)
SimpleLocaleContext holding the system default locale.
protected java.util.Locale getLocale()
protected Style getDefaultDateStyle()
Style.MEDIUM.
public void setDefaultDateStyle(Style defaultDateStyle)
public Style getDefaultTimeStyle()
Style.MEDIUM.
public void setDefaultTimeStyle(Style defaultTimeStyle)
public Formatter getDateFormatter()
FormatterFactory
getDateFormatter in interface FormatterFactorypublic Formatter getDateTimeFormatter()
FormatterFactory
getDateTimeFormatter in interface FormatterFactorypublic Formatter getTimeFormatter()
FormatterFactory
getTimeFormatter in interface FormatterFactory
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||