|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.report.function.AbstractFunction
org.jfree.report.function.TotalItemCountFunction
A report function that counts the total number of items contained in groups in a report. If a null-groupname is given, all groups are counted.
A group can be defined using the property "group". If the group property is not set, all group starts get counted.
Field Summary | |
static java.lang.String |
GROUP_PROPERTY
Literal text for the 'group' property. |
Fields inherited from interface org.jfree.report.function.Expression |
AUTOACTIVATE_PROPERTY |
Constructor Summary | |
TotalItemCountFunction()
Default constructor. |
Method Summary | |
protected int |
getCount()
Returns the current group count value. |
java.lang.String |
getGroup()
Returns the name of the group to be totalled. |
Expression |
getInstance()
Return a completly separated copy of this function. |
java.lang.Object |
getValue()
Returns the number of items counted (so far) by the function. |
void |
groupStarted(ReportEvent event)
Receives notification that a new group is about to start. |
void |
itemsAdvanced(ReportEvent event)
Received notification of a move to the next row of data. |
void |
reportInitialized(ReportEvent event)
Receives notification that a new report is about to start. |
protected void |
setCount(int count)
Defines the current group count value. |
void |
setGroup(java.lang.String group)
Defines the name of the group to be totalled. |
Methods inherited from class org.jfree.report.function.AbstractFunction |
clone, getDataRow, getDependencyLevel, getName, getProperties, getProperty, getProperty, groupFinished, initialize, isActive, itemsFinished, itemsStarted, reportDone, reportFinished, reportStarted, 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 GROUP_PROPERTY
Constructor Detail |
public TotalItemCountFunction()
Method Detail |
public void reportInitialized(ReportEvent event)
reportInitialized
in interface ReportListener
reportInitialized
in class AbstractFunction
event
- the current report event received.protected int getCount()
public void groupStarted(ReportEvent event)
groupStarted
in interface ReportListener
groupStarted
in class AbstractFunction
event
- the current report event received.protected void setCount(int count)
count
- the curernt group count.public java.lang.String getGroup()
public void setGroup(java.lang.String group)
group
- the group name.public void itemsAdvanced(ReportEvent event)
itemsAdvanced
in interface ReportListener
itemsAdvanced
in class AbstractFunction
event
- Information about the event.public java.lang.Object getValue()
getValue
in interface Expression
public Expression getInstance()
getInstance
in interface Expression
getInstance
in class AbstractFunction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |