|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.reporting.engine.classic.core.elementfactory.ElementFactory org.pentaho.reporting.engine.classic.core.elementfactory.TextElementFactory org.pentaho.reporting.engine.classic.core.elementfactory.TextFieldElementFactory org.pentaho.reporting.engine.classic.core.elementfactory.DateFieldElementFactory
public class 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 Element |
createDateElement(String name,
Rectangle2D bounds,
Color paint,
ElementAlignment alignment,
ElementAlignment valign,
FontDefinition font,
String nullString,
DateFormat format,
String field)
Deprecated. Use a more fine-grained approach to define this element by using the element-factory directly. |
static Element |
createDateElement(String name,
Rectangle2D bounds,
Color paint,
ElementAlignment alignment,
ElementAlignment valign,
FontDefinition font,
String nullString,
String format,
String field)
Deprecated. Use a more fine-grained approach to define this element by using the element-factory directly. |
static Element |
createDateElement(String name,
Rectangle2D bounds,
Color paint,
ElementAlignment alignment,
FontDefinition font,
String nullString,
DateFormat format,
String field)
Deprecated. Use a more fine-grained approach to define this element by using the element-factory directly. |
static Element |
createDateElement(String name,
Rectangle2D bounds,
Color paint,
ElementAlignment alignment,
FontDefinition font,
String nullString,
String format,
String field)
Deprecated. Use a more fine-grained approach to define this element by using the element-factory directly. |
Element |
createElement()
Creates the date text element based on the defined settings. |
String |
getExcelCellFormat()
Returns the excel export cell format. |
DateFormat |
getFormat()
Returns the date format used for all generated text elements. |
String |
getFormatString()
Returns the format string of the used date format. |
void |
setExcelCellFormat(String excelCellFormat)
Defines a special cell format that should be used when exporting the report into Excel workbooks. |
void |
setFormat(DateFormat format)
Defines the date format used for all generated text elements. |
void |
setFormatString(String formatString)
Defines the format string of the used date format. |
Methods inherited from class org.pentaho.reporting.engine.classic.core.elementfactory.TextFieldElementFactory |
---|
createStringElement, createStringElement, getFieldname, getFormula, getNullString, setFieldname, setFormula, setNullString |
Methods inherited from class org.pentaho.reporting.engine.classic.core.elementfactory.TextElementFactory |
---|
getBold, getEmbedFont, getEncoding, getFontName, getFontSize, getItalic, getLineHeight, getMaximumLetterSpacing, getMinimumLetterSpacing, getOptimumLetterSpacing, getReservedLiteral, getStrikethrough, getTrimTextContent, getUnderline, getVerticalTextAlignment, getWhitespaceCollapse, getWrap, getWrapText, setBold, setEmbedFont, setEncoding, setFontName, setFontSize, setItalic, setLineHeight, setMaximumLetterSpacing, setMinimumLetterSpacing, setOptimumLetterSpacing, setReservedLiteral, setStrikethrough, setTrimTextContent, setUnderline, setVerticalTextAlignment, setWhitespaceCollapse, setWrap, setWrapText |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DateFieldElementFactory()
Method Detail |
---|
public String getExcelCellFormat()
public void setExcelCellFormat(String excelCellFormat)
excelCellFormat
- the excel cell formatpublic DateFormat getFormat()
public void setFormat(DateFormat format)
format
- the date format used in this factory.public String getFormatString()
public void setFormatString(String formatString)
formatString
- the formatstring of the date format instance.public Element createElement()
createElement
in class TextFieldElementFactory
ElementFactory.createElement()
public static Element createDateElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, FontDefinition font, String nullString, String format, String field)
Element
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
NullPointerException
- if bounds, format or field are null
IllegalArgumentException
- if the given alignment is invalidpublic static Element createDateElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, String nullString, String format, String field)
Element
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
NullPointerException
- if bounds, format or field are null
IllegalArgumentException
- if the given alignment is invalidpublic static Element createDateElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, FontDefinition font, String nullString, DateFormat format, String field)
Element
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
NullPointerException
- if bounds, name, format or field are null
IllegalArgumentException
- if the given alignment is invalidpublic static Element createDateElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, String nullString, DateFormat format, 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
NullPointerException
- if bounds, name, format or field are null
IllegalArgumentException
- if the given alignment is invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |