|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.report.elementfactory.ElementFactory
org.jfree.report.elementfactory.TextElementFactory
org.jfree.report.elementfactory.TextFieldElementFactory
org.jfree.report.elementfactory.DateFieldElementFactory
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.
Constructor Summary | |
DateFieldElementFactory()
Creates a new date field element factory. |
Method Summary | |
static TextElement |
createDateElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Color paint,
ElementAlignment alignment,
ElementAlignment valign,
FontDefinition font,
java.lang.String nullString,
java.text.DateFormat format,
java.lang.String field)
Creates a new TextElement containing a date filter structure. |
static TextElement |
createDateElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Color paint,
ElementAlignment alignment,
ElementAlignment valign,
FontDefinition font,
java.lang.String nullString,
java.lang.String format,
java.lang.String field)
Creates a new TextElement containing a date filter structure. |
static TextElement |
createDateElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Color paint,
ElementAlignment alignment,
FontDefinition font,
java.lang.String nullString,
java.text.DateFormat format,
java.lang.String field)
Creates a new TextElement containing a date filter structure. |
static TextElement |
createDateElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Color paint,
ElementAlignment alignment,
FontDefinition font,
java.lang.String nullString,
java.lang.String format,
java.lang.String field)
Creates a new TextElement containing a date filter structure. |
Element |
createElement()
Creates the date text element based on the defined settings. |
java.text.DateFormat |
getFormat()
Returns the date format used for all generated text elements. |
java.lang.String |
getFormatString()
Returns the format string of the used date format. |
void |
setFormat(java.text.DateFormat format)
Defines the date format used for all generated text elements. |
void |
setFormatString(java.lang.String formatString)
Defines the format string of the used date format. |
Methods inherited from class org.jfree.report.elementfactory.TextFieldElementFactory |
createStringElement, createStringElement, getFieldname, getNullString, setFieldname, setNullString |
Methods inherited from class org.jfree.report.elementfactory.TextElementFactory |
applyStyle, getBold, getColor, getEmbedFont, getEncoding, getFontName, getFontSize, getHorizontalAlignment, getItalic, getLineHeight, getReservedLiteral, getStrikethrough, getTrimTextContent, getUnderline, getVerticalAlignment, setBold, setColor, setEmbedFont, setEncoding, setFontName, setFontSize, setHorizontalAlignment, setItalic, setLineHeight, setReservedLiteral, setStrikethrough, setTrimTextContent, setUnderline, setVerticalAlignment |
Methods inherited from class org.jfree.report.elementfactory.ElementFactory |
applyElementName, getAbsolutePosition, getDynamicHeight, getMaximumSize, getMinimumSize, getName, getPreferredSize, setAbsolutePosition, setDynamicHeight, setMaximumSize, setMinimumSize, setName, setPreferredSize |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DateFieldElementFactory()
Method Detail |
public java.text.DateFormat getFormat()
public void setFormat(java.text.DateFormat format)
format
- the date format used in this factory.public java.lang.String getFormatString()
public void setFormatString(java.lang.String formatString)
formatString
- the formatstring of the date format instance.public Element createElement()
createElement
in class TextFieldElementFactory
ElementFactory.createElement()
public static TextElement createDateElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Color paint, ElementAlignment alignment, FontDefinition font, java.lang.String nullString, java.lang.String format, java.lang.String field)
TextElement
containing a date filter structure.
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignment.font
- the font for this elementnullString
- the text used when the value of this element is null
format
- the SimpleDateFormat-formatstring used to format the datefield
- the fieldname to retrieve values from
java.lang.NullPointerException
- if bounds, format or field are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createDateElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Color paint, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, java.lang.String nullString, java.lang.String format, java.lang.String field)
TextElement
containing a date filter structure.
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignmentvalign
- the vertical text alignmentfont
- the font for this elementnullString
- the text used when the value of this element is null
format
- the SimpleDateFormat-formatstring used to format the datefield
- the fieldname to retrieve values from
java.lang.NullPointerException
- if bounds, format or field are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createDateElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Color paint, ElementAlignment alignment, FontDefinition font, java.lang.String nullString, java.text.DateFormat format, java.lang.String field)
TextElement
containing a date filter structure.
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignmentfont
- the font for this elementnullString
- the text used when the value of this element is null
format
- the SimpleDateFormat used to format the datefield
- the fieldname to retrieve values from
java.lang.NullPointerException
- if bounds, name, format or field are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createDateElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Color paint, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, java.lang.String nullString, java.text.DateFormat format, java.lang.String field)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignment.valign
- the vertical text alignmentfont
- the font for this elementnullString
- the text used when the value of this element is nullformat
- the SimpleDateFormat used to format the datefield
- the fieldname to retrieve values from
java.lang.NullPointerException
- if bounds, name, format or field are null
java.lang.IllegalArgumentException
- if the given alignment is invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |