|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
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.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 TextElement |
createNumberElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Color color,
ElementAlignment alignment,
ElementAlignment valign,
FontDefinition font,
java.lang.String nullString,
java.text.NumberFormat format,
java.lang.String field)
Creates a new TextElement containing a numeric filter structure. |
static TextElement |
createNumberElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Color color,
ElementAlignment alignment,
ElementAlignment valign,
FontDefinition font,
java.lang.String nullString,
java.lang.String format,
java.lang.String field)
Creates a new TextElement containing a numeric filter structure. |
static TextElement |
createNumberElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Color paint,
ElementAlignment alignment,
FontDefinition font,
java.lang.String nullString,
java.text.NumberFormat format,
java.lang.String field)
Creates a new TextElement containing a numeric filter structure. |
static TextElement |
createNumberElement(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 numeric filter structure. |
java.text.NumberFormat |
getFormat()
Returns the number format used for all generated text elements. |
java.lang.String |
getFormatString()
Returns the format string of the used number format. |
void |
setFormat(java.text.NumberFormat format)
Defines the number format used for all generated text elements. |
void |
setFormatString(java.lang.String formatString)
Defines the format string of the used number 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 NumberFieldElementFactory()
Method Detail |
public java.text.NumberFormat getFormat()
public void setFormat(java.text.NumberFormat format)
format
- the number format used in this factory.public java.lang.String getFormatString()
public void setFormatString(java.lang.String formatString)
formatString
- the formatstring of the number format instance.public Element createElement()
createElement
in class TextFieldElementFactory
ElementFactory.createElement()
public static TextElement createNumberElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Color paint, ElementAlignment alignment, FontDefinition font, java.lang.String nullString, java.text.NumberFormat 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.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.
java.lang.NullPointerException
- if bounds, name or function are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createNumberElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Color color, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, java.lang.String nullString, java.text.NumberFormat format, java.lang.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.
java.lang.NullPointerException
- if bounds, name or function are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createNumberElement(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)
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.
java.lang.NullPointerException
- if bounds, name or function are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createNumberElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Color color, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, java.lang.String nullString, java.lang.String format, java.lang.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.
java.lang.NullPointerException
- if bounds, name or function are null
java.lang.IllegalArgumentException
- if the given alignment is invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |