| java.lang.Object org.jfree.report.elementfactory.ElementFactory org.jfree.report.elementfactory.TextElementFactory org.jfree.report.elementfactory.TextFieldElementFactory org.jfree.report.elementfactory.DateFieldElementFactory
DateFieldElementFactory | public class DateFieldElementFactory extends TextFieldElementFactory (Code) | | The date format factory can be used to create date/time text elements. These text
elements have special abilities to format date/time values.
Once the desired properties are set, the factory can be reused to create similiar text
elements.
author: Thomas Morgner |
Method Summary | |
public static TextElement | createDateElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, FontDefinition font, String nullString, String format, String field) Creates a new
TextElement containing a date filter structure. | public static TextElement | createDateElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, String nullString, String format, String field) Creates a new
TextElement containing a date filter structure. | public static TextElement | createDateElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, FontDefinition font, String nullString, DateFormat format, String field) Creates a new
TextElement containing a date filter structure. | public static TextElement | createDateElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, String nullString, DateFormat format, String field) Creates a new TextElement containing a date filter structure. | public Element | createElement() Creates the date text element based on the defined settings. | public String | getExcelCellFormat() Returns the excel export cell format. | public DateFormat | getFormat() Returns the date format used for all generated text elements. | public String | getFormatString() Returns the format string of the used date format. | public void | setExcelCellFormat(String excelCellFormat) Defines a special cell format that should be used when exporting the report
into Excel workbooks. | public void | setFormat(DateFormat format) Defines the date format used for all generated text elements. | public void | setFormatString(String formatString) Defines the format string of the used date format. |
DateFieldElementFactory | public DateFieldElementFactory()(Code) | | Creates a new date field element factory.
|
createDateElement | public static TextElement createDateElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, FontDefinition font, String nullString, String format, String field)(Code) | | Creates a new
TextElement containing a date filter structure.
Parameters: name - the name of the new element Parameters: bounds - the bounds of the new element Parameters: paint - the text color of this text element Parameters: alignment - the horizontal text alignment. Parameters: font - the font for this element Parameters: nullString - the text used when the value of this element is null Parameters: format - the SimpleDateFormat-formatstring used to format the date Parameters: field - the fieldname to retrieve values from a report element for displaying a java.util.Date value. throws: NullPointerException - if bounds, format or field are null throws: IllegalArgumentException - if the given alignment is invalid |
createDateElement | public static TextElement createDateElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, String nullString, String format, String field)(Code) | | Creates a new
TextElement containing a date filter structure.
Parameters: name - the name of the new element Parameters: bounds - the bounds of the new element Parameters: paint - the text color of this text element Parameters: alignment - the horizontal text alignment Parameters: valign - the vertical text alignment Parameters: font - the font for this element Parameters: nullString - the text used when the value of this element is null Parameters: format - the SimpleDateFormat-formatstring used to format the date Parameters: field - the fieldname to retrieve values from a report element for displaying a java.util.Date value. throws: NullPointerException - if bounds, format or field are null throws: IllegalArgumentException - if the given alignment is invalid |
createDateElement | public static TextElement createDateElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, FontDefinition font, String nullString, DateFormat format, String field)(Code) | | Creates a new
TextElement containing a date filter structure.
Parameters: name - the name of the new element Parameters: bounds - the bounds of the new element Parameters: paint - the text color of this text element Parameters: alignment - the horizontal text alignment Parameters: font - the font for this element Parameters: nullString - the text used when the value of this element is null Parameters: format - the SimpleDateFormat used to format the date Parameters: field - the fieldname to retrieve values from a report element for displaying a java.util.Date value. throws: NullPointerException - if bounds, name, format or field arenull throws: IllegalArgumentException - if the given alignment is invalid |
createDateElement | public static TextElement createDateElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, String nullString, DateFormat format, String field)(Code) | | Creates a new TextElement containing a date filter structure.
Parameters: name - the name of the new element Parameters: bounds - the bounds of the new element Parameters: paint - the text color of this text element Parameters: alignment - the horizontal text alignment. Parameters: valign - the vertical text alignment Parameters: font - the font for this element Parameters: nullString - the text used when the value of this element is null Parameters: format - the SimpleDateFormat used to format the date Parameters: field - the fieldname to retrieve values from a report element for displaying a java.util.Date value. throws: NullPointerException - if bounds, name, format or field are null throws: IllegalArgumentException - if the given alignment is invalid |
getExcelCellFormat | public String getExcelCellFormat()(Code) | | Returns the excel export cell format.
the excel cell format. |
getFormat | public DateFormat getFormat()(Code) | | Returns the date format used for all generated text elements. The date format is
shared among all generated elements.
the date format used in this factory. |
getFormatString | public String getFormatString()(Code) | | Returns the format string of the used date format. This method will return null, if
the current date format is no instance of SimpleDateFormat.
the formatstring of the date format instance. |
setExcelCellFormat | public void setExcelCellFormat(String excelCellFormat)(Code) | | Defines a special cell format that should be used when exporting the report
into Excel workbooks.
Parameters: excelCellFormat - the excel cell format |
setFormat | public void setFormat(DateFormat format)(Code) | | Defines the date format used for all generated text elements. The date format is
shared among all generated elements.
Parameters: format - the date format used in this factory. |
setFormatString | public void setFormatString(String formatString)(Code) | | Defines the format string of the used date format. This method will replace the date
format instance of this factory. If the format string is null, the default format
string of the current locale is used.
Parameters: formatString - the formatstring of the date format instance. |
Methods inherited from org.jfree.report.elementfactory.TextFieldElementFactory | public Element createElement()(Code)(Java Doc) public static TextElement createStringElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, FontDefinition font, String nullString, String field)(Code)(Java Doc) public static TextElement createStringElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, String nullString, String field)(Code)(Java Doc) public String getFieldname()(Code)(Java Doc) public String getFormula()(Code)(Java Doc) public String getNullString()(Code)(Java Doc) public void setFieldname(String fieldname)(Code)(Java Doc) public void setFormula(String formula)(Code)(Java Doc) public void setNullString(String nullString)(Code)(Java Doc)
|
|
|