|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pentaho.reporting.engine.classic.core.elementfactory.ElementFactory
org.pentaho.reporting.engine.classic.core.elementfactory.TextElementFactory
org.pentaho.reporting.engine.classic.core.elementfactory.TextFieldElementFactory
public class 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 Element |
createStringElement(String name,
Rectangle2D bounds,
Color paint,
ElementAlignment alignment,
ElementAlignment valign,
FontDefinition font,
String nullString,
String field)
Deprecated. Use a more fine-grained approach to define this element by using the element-factory directly. |
static Element |
createStringElement(String name,
Rectangle2D bounds,
Color paint,
ElementAlignment alignment,
FontDefinition font,
String nullString,
String field)
Deprecated. Use a more fine-grained approach to define this element by using the element-factory directly. |
String |
getFieldname()
Returns the field name from where to read the content of the element. |
String |
getFormula()
Returns the formula that should be used to compute the value of the field. |
String |
getNullString()
Returns the null string for the text element. |
void |
setFieldname(String fieldname)
Defines the field name from where to read the content of the element. |
void |
setFormula(String formula)
Assigns a formula to the element to compute the value for this element. |
void |
setNullString(String nullString)
Defines the null string for the text element. |
| 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 TextFieldElementFactory()
| Method Detail |
|---|
public String getFieldname()
public void setFieldname(String fieldname)
fieldname - the field name.public String getFormula()
public void setFormula(String formula)
formula - the formula as a string.public String getNullString()
public void setNullString(String nullString)
nullString - the null string.public Element createElement()
createElement in class ElementFactoryElementFactory.createElement()
public static Element createStringElement(String name,
Rectangle2D bounds,
Color paint,
ElementAlignment alignment,
FontDefinition font,
String nullString,
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.
NullPointerException - if bounds, name or function are null
IllegalArgumentException - if the given alignment is invalid
public static Element createStringElement(String name,
Rectangle2D bounds,
Color paint,
ElementAlignment alignment,
ElementAlignment valign,
FontDefinition font,
String nullString,
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.
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 | |||||||||