| |
|
| java.lang.Object org.jfree.report.filter.DataRowDataSource
DataRowDataSource | public class DataRowDataSource implements DataSource(Code) | | A DataSource that can access values from the 'data-row'. The data-row contains all values from the current row of the
report's TableModel , plus the current values of the defined expressions and functions for the report.
The DataRowDataSource can either query the data-row directly using the specified field name or it can evaluate a
given formula (which must be compatible to the OpenFormula specifications) to compute the value.
Fields and formulas are mutually exclusive; defining a field name autmatically undefines the formula and vice versa.
author: Thomas Morgner See Also: org.jfree.report.DataRow |
Method Summary | |
public Object | clone() Clones the data source. | public String | getDataSourceColumnName() Returns the data source column name. | public String | getFormula() Returns the formula used to compute the value of the data source. | public Object | getValue(ExpressionRuntime runtime) Returns the current value of the data source, obtained from a particular column in the data-row.
Parameters: runtime - the expression runtime that is used to evaluate formulas and expressions when computing the value ofthis filter. | public void | setDataSourceColumnName(String dataSourceColumnName) Defines the name of the column in the datarow to be queried. | public void | setFormula(String formula) Defines the formula used to compute the value of this data source. |
DataRowDataSource | public DataRowDataSource()(Code) | | Default constructor.
The expression name is empty ("", not null), the value initially null.
|
DataRowDataSource | public DataRowDataSource(String column)(Code) | | Constructs a new data source.
Parameters: column - the name of the field, function or expression in the data-row. |
getDataSourceColumnName | public String getDataSourceColumnName()(Code) | | Returns the data source column name.
the column name. |
getFormula | public String getFormula()(Code) | | Returns the formula used to compute the value of the data source.
the formula. |
getValue | public Object getValue(ExpressionRuntime runtime)(Code) | | Returns the current value of the data source, obtained from a particular column in the data-row.
Parameters: runtime - the expression runtime that is used to evaluate formulas and expressions when computing the value ofthis filter. the value. |
setDataSourceColumnName | public void setDataSourceColumnName(String dataSourceColumnName)(Code) | | Defines the name of the column in the datarow to be queried.
Parameters: dataSourceColumnName - the name of the column in the datarow to be queried. throws: NullPointerException - if the name is null . See Also: org.jfree.report.DataRow.get |
setFormula | public void setFormula(String formula)(Code) | | Defines the formula used to compute the value of this data source.
Parameters: formula - the formula for the data source. |
|
|
|