| |
|
| java.lang.Object org.jfree.report.elementfactory.ElementFactory org.jfree.report.elementfactory.TextElementFactory org.jfree.report.elementfactory.TextFieldElementFactory
All known Subclasses: org.jfree.report.elementfactory.DateFieldElementFactory, org.jfree.report.elementfactory.ResourceFieldElementFactory, org.jfree.report.elementfactory.NumberFieldElementFactory,
TextFieldElementFactory | public class TextFieldElementFactory extends TextElementFactory (Code) | | A factory to define text fields. Text fields read their content from the dataRow and
try to print it as plain text (using toString() if required).
author: Thomas Morgner |
Method Summary | |
public Element | createElement() Creates the text field element. | public static TextElement | createStringElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, FontDefinition font, String nullString, String field) Creates a new TextElement without any additional filtering. | public static TextElement | createStringElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, String nullString, String field) Creates a new TextElement without any additional filtering. | public String | getFieldname() Returns the field name from where to read the content of the element. | public String | getFormula() Returns the formula that should be used to compute the value of the field. | public String | getNullString() Returns the null string for the text element. | public void | setFieldname(String fieldname) Defines the field name from where to read the content of the element. | public void | setFormula(String formula) Assigns a formula to the element to compute the value for this element. | public void | setNullString(String nullString) Defines the null string for the text element. |
TextFieldElementFactory | public TextFieldElementFactory()(Code) | | DefaultConstructor.
|
createStringElement | public static TextElement createStringElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, FontDefinition font, String nullString, String field)(Code) | | Creates a new TextElement without any additional filtering.
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: field - the field in the datamodel to retrieve values from a report element for displaying String objects. throws: NullPointerException - if bounds, name or function are null throws: IllegalArgumentException - if the given alignment is invalid |
createStringElement | public static TextElement createStringElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, String nullString, String field)(Code) | | Creates a new TextElement without any additional filtering.
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 alignment. Parameters: font - the font for this element Parameters: nullString - the text used when the value of this element is null Parameters: field - the field in the datamodel to retrieve values from a report element for displaying String objects. throws: NullPointerException - if bounds, name or function are null throws: IllegalArgumentException - if the given alignment is invalid |
getFieldname | public String getFieldname()(Code) | | Returns the field name from where to read the content of the element.
the field name. |
getFormula | public String getFormula()(Code) | | Returns the formula that should be used to compute the value of the field.
The formula must be valid according to the OpenFormula
specifications.
the formula as string. |
getNullString | public String getNullString()(Code) | | Returns the null string for the text element. The null string is used when no content
is found for that element.
the null string. |
setFieldname | public void setFieldname(String fieldname)(Code) | | Defines the field name from where to read the content of the element. The field name
is the name of a datarow column.
Parameters: fieldname - the field name. |
setFormula | public void setFormula(String formula)(Code) | | Assigns a formula to the element to compute the value for this element.
If a formula is defined, it will override the 'field' property.
Parameters: formula - the formula as a string. |
setNullString | public void setNullString(String nullString)(Code) | | Defines the null string for the text element. The null string is used when no content
is found for that element. The nullstring itself can be null.
Parameters: nullString - the null string. |
|
|
|