|
||||||||||
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
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).
Constructor Summary | |
TextFieldElementFactory()
DefaultConstructor. |
Method Summary | |
Element |
createElement()
Creates the text field element. |
static TextElement |
createStringElement(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 field)
Creates a new TextElement without any additional filtering. |
static TextElement |
createStringElement(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Color paint,
ElementAlignment alignment,
FontDefinition font,
java.lang.String nullString,
java.lang.String field)
Creates a new TextElement without any additional filtering. |
java.lang.String |
getFieldname()
Returns the field name from where to read the content of the element. |
java.lang.String |
getNullString()
Returns the null string for the text element. |
void |
setFieldname(java.lang.String fieldname)
Defines the field name from where to read the content of the element. |
void |
setNullString(java.lang.String nullString)
Defines the null string for the text element. |
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 TextFieldElementFactory()
Method Detail |
public java.lang.String getFieldname()
public void setFieldname(java.lang.String fieldname)
fieldname
- the field name.public java.lang.String getNullString()
public void setNullString(java.lang.String nullString)
nullString
- the null string.public Element createElement()
createElement
in class ElementFactory
java.lang.IllegalStateException
- if the fieldname is null.ElementFactory.createElement()
public static TextElement createStringElement(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Color paint, ElementAlignment alignment, FontDefinition font, java.lang.String nullString, 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 from
String
objects.
java.lang.NullPointerException
- if bounds, name or function are null
java.lang.IllegalArgumentException
- if the given alignment is invalidpublic static TextElement createStringElement(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 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 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 from
String
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 | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |