|
||||||||||
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.NumberFieldElementFactory
public class NumberFieldElementFactory
The number format factory can be used to create numeric text elements. These text elements have special abilities to format numeric values.
Once the desired properties are set, the factory can be reused to create similiar text elements.
Constructor Summary | |
---|---|
NumberFieldElementFactory()
Creates a new number field element factory. |
Method Summary | |
---|---|
Element |
createElement()
Creates the number text element based on the defined settings. |
static Element |
createNumberElement(String name,
Rectangle2D bounds,
Color color,
ElementAlignment alignment,
ElementAlignment valign,
FontDefinition font,
String nullString,
NumberFormat format,
String field)
Deprecated. Use a more fine-grained approach to define this element by using the element-factory directly. |
static Element |
createNumberElement(String name,
Rectangle2D bounds,
Color color,
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 |
createNumberElement(String name,
Rectangle2D bounds,
Color paint,
ElementAlignment alignment,
FontDefinition font,
String nullString,
NumberFormat format,
String field)
Deprecated. Use a more fine-grained approach to define this element by using the element-factory directly. |
static Element |
createNumberElement(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. |
String |
getExcelCellFormat()
Returns the excel export cell format. |
NumberFormat |
getFormat()
Returns the number format used for all generated text elements. |
String |
getFormatString()
Returns the format string of the used number format. |
void |
setExcelCellFormat(String excelCellFormat)
Defines a special cell format that should be used when exporting the report into Excel workbooks. |
void |
setFormat(NumberFormat format)
Defines the number format used for all generated text elements. |
void |
setFormatString(String formatString)
Defines the format string of the used number 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 NumberFieldElementFactory()
Method Detail |
---|
public String getExcelCellFormat()
public void setExcelCellFormat(String excelCellFormat)
excelCellFormat
- the excel cell formatpublic NumberFormat getFormat()
public void setFormat(NumberFormat format)
format
- the number format used in this factory.public String getFormatString()
public void setFormatString(String formatString)
formatString
- the formatstring of the number format instance.public Element createElement()
createElement
in class TextFieldElementFactory
ElementFactory.createElement()
public static Element createNumberElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, FontDefinition font, String nullString, NumberFormat 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.font
- the font for this elementnullString
- the text used when the value of this element is nullfield
- the field in the datamodel to retrieve values fromformat
- the NumberFormat used in this number element
Number
objects.
NullPointerException
- if bounds, name or function are null
IllegalArgumentException
- if the given alignment is invalidpublic static Element createNumberElement(String name, Rectangle2D bounds, Color color, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, String nullString, NumberFormat format, String field)
name
- the name of the new element.bounds
- the bounds of the new element.color
- the text color of this text element.alignment
- the horizontal text alignment.valign
- the vertical alignment.font
- the font for this element.nullString
- the text used when the value of this element is null.field
- the field in the datamodel to retrieve values from.format
- the NumberFormat used in this number element.
Number
objects.
NullPointerException
- if bounds, name or function are null
IllegalArgumentException
- if the given alignment is invalidpublic static Element createNumberElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, FontDefinition font, String nullString, String 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.font
- the font for this elementnullString
- the text used when the value of this element is nullfield
- the fieldname in the datamodel to retrieve values fromformat
- the DecimalFormatString used in this text field
Number
objects.
NullPointerException
- if bounds, name or function are null
IllegalArgumentException
- if the given alignment is invalidpublic static Element createNumberElement(String name, Rectangle2D bounds, Color color, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, String nullString, String format, String field)
name
- the name of the new element.bounds
- the bounds of the new element.color
- the text color of the element.alignment
- the horizontal text alignment.valign
- the vertical alignment.font
- the font for this element.nullString
- t he text used when the value of this element is null.field
- the fieldname in the datamodel to retrieve values from.format
- the DecimalFormatString used in this text field.
Number
objects.
NullPointerException
- if bounds, name or function 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 |