|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.report.function.AbstractExpression
org.jfree.report.function.TextFormatExpression
A TextFormatExpression uses a java.text.MessageFormat to concat and format one or more values evaluated from an expression, function or report datasource.
The TextFormatExpression uses the pattern property to define the global format-pattern used when evaluating the expression. The dataRow fields used to fill the expressions placeholders are defined in a list of properties where the property-names are numbers. The property counting starts at "0".
The Syntax of the pattern
property is explained in java.text.MessageFormat.
Example:
Invoice for your order from {0, date, EEE, MMM d, yyyy} printdate
Field Summary | |
static java.lang.String |
PATTERN_PROPERTY
The property key for the pattern property. |
Fields inherited from interface org.jfree.report.function.Expression |
AUTOACTIVATE_PROPERTY |
Constructor Summary | |
TextFormatExpression()
Default constructor, creates a new unnamed TextFormatExpression. |
Method Summary | |
java.lang.Object |
clone()
Clones the expression. |
java.lang.String |
getPattern()
Returns the pattern defined for this expression. |
java.lang.Object |
getValue()
Evaluates the expression by collecting all values defined in the fieldlist from the datarow. |
void |
initialize()
Initializes the expression and creates the fieldlist. |
void |
setPattern(java.lang.String pattern)
Defines the pattern for this expression. |
Methods inherited from class org.jfree.report.function.AbstractExpression |
getDataRow, getDependencyLevel, getInstance, getName, getProperties, getProperty, getProperty, isActive, setDataRow, setDependencyLevel, setName, setProperties, setProperty |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String PATTERN_PROPERTY
Constructor Detail |
public TextFormatExpression()
Method Detail |
public java.lang.Object getValue()
getValue
in interface Expression
public void initialize() throws FunctionInitializeException
initialize
in interface Expression
initialize
in class AbstractExpression
FunctionInitializeException
- if the expression has no name setpublic java.lang.String getPattern()
public void setPattern(java.lang.String pattern)
pattern
- the pattern stringpublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface Expression
clone
in class AbstractExpression
java.lang.CloneNotSupportedException
- this should never happen.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |