|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jrefinery.report.filter.FormatFilter | +--com.jrefinery.report.filter.DateFormatFilter | +--com.jrefinery.report.filter.SimpleDateFormatFilter
A filter that creates string from dates. This filter will format java.util. Date objects using a java.text.SimpleDateFormat to create the string representation for the date obtained from the datasource.
If the object read from the datasource is no date, the NullValue defined by setNullValue(Object) is returned.
This implementation uses a SimpleDateFormat and grants more control over the parsing results.
SimpleDateFormat
,
Serialized FormConstructor Summary | |
SimpleDateFormatFilter()
DefaultConstructor. |
Method Summary | |
java.lang.String |
getFormatString()
Returns the formatString for this SimpleDateFormat. |
java.lang.String |
getLocalizedFormatString()
Returns a localized formatString for this SimpleDateFormat. |
java.text.SimpleDateFormat |
getSimpleDateFormat()
Returns the SimpleDateFormat object used in this filter. |
void |
setFormatString(java.lang.String format)
defines the formatString for this SimpleDateFormat. |
void |
setFormatter(java.text.Format format)
Sets the date format for the filter. |
void |
setLocalizedFormatString(java.lang.String format)
defines the localized formatString for this SimpleDateFormat. |
void |
setSimpleDateFormat(java.text.SimpleDateFormat format)
Sets the date format for the filter. |
Methods inherited from class com.jrefinery.report.filter.DateFormatFilter |
getDateFormat, setDateFormat |
Methods inherited from class com.jrefinery.report.filter.FormatFilter |
clone, getDataSource, getFormatter, getNullValue, getValue, setDataSource, setNullValue |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleDateFormatFilter()
Method Detail |
public java.text.SimpleDateFormat getSimpleDateFormat()
public void setSimpleDateFormat(java.text.SimpleDateFormat format)
format
- The format.
java.lang.NullPointerException
- if the format given is nullpublic void setFormatter(java.text.Format format)
setFormatter
in class DateFormatFilter
format
- The format.
java.lang.NullPointerException
- if the format given is null
java.lang.ClassCastException
- if the format given is no DateFormatpublic java.lang.String getFormatString()
SimpleDateFormat
public void setFormatString(java.lang.String format)
format
- the formatString
java.lang.IllegalArgumentException
- if the string is invalidpublic java.lang.String getLocalizedFormatString()
SimpleDateFormat
public void setLocalizedFormatString(java.lang.String format)
format
- the formatString
java.lang.IllegalArgumentException
- if the string is invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |