| |
|
| java.lang.Object org.jfree.report.function.AbstractExpression org.jfree.report.function.AbstractFunction org.jfree.report.function.ItemMinFunction
ItemMinFunction | public class ItemMinFunction extends AbstractFunction (Code) | | A report function that calculates the minimum value of one field (column) from the
data-row. The function can be used in two ways: - to calculate a minimum value
for the entire report;
- to calculate a minimum value within a particular
group;
This function expects its input values to be either java.lang.Number
instances or Strings that can be parsed to java.lang.Number instances using a
java.text.DecimalFormat.
The function undestands two parameters, the field parameter is required
and denotes the name of an ItemBand-field which gets summed up.
The parameter group denotes the name of a group. When this group is
started, the counter gets reseted to null.
author: Thomas Morgner |
ItemMinFunction | public ItemMinFunction()(Code) | | Constructs an unnamed function. Make sure to set a Name or function initialisation
will fail.
|
ItemMinFunction | public ItemMinFunction(String name)(Code) | | Constructs a named function. The field must be defined before using the
function.
Parameters: name - The function name. |
getField | public String getField()(Code) | | Returns the field used by the function. The field name corresponds to a column name in the report's data-row.
The field name. |
getGroup | public String getGroup()(Code) | | Returns the group name.
The group name. |
getInstance | public Expression getInstance()(Code) | | Return a completly separated copy of this function. The copy does no longer share any
changeable objects with the original function.
a copy of this function. |
getValue | public Object getValue()(Code) | | Returns the function value, in this case the running total of a specific column in
the report's data row.
The function value. |
groupStarted | public void groupStarted(ReportEvent event)(Code) | | Receives notification that a new group is about to start. If this is the group
defined for the function, then the minimum value is reset to zero.
Parameters: event - Information about the event. |
itemsAdvanced | public void itemsAdvanced(ReportEvent event)(Code) | | Receives notification that a row of data is being processed. Reads the data from the
field defined for this function and calculates the minimum value.
Parameters: event - Information about the event. |
reportInitialized | public void reportInitialized(ReportEvent event)(Code) | | Receives notification that a new report is about to start. Does nothing.
Parameters: event - Information about the event. |
setField | public void setField(String field)(Code) | | Sets the field name for the function. The field name corresponds to a column name in the report's data-row.
Parameters: field - the field name. |
setGroup | public void setGroup(String name)(Code) | | Sets the group name. If a group is defined, the minimum value is reset to zero at
the start of every instance of this group.
Parameters: name - the group name (null permitted). |
|
|
|