|
||||||||||
| 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.ItemCountFunction
A report function that counts items in a report. If the "group" property is set, the item count is reset to zero whenever the group changes.
| 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 | |
ItemCountFunction()
Constructs an unnamed function. |
|
ItemCountFunction(java.lang.String name)
Constructs an item count report function. |
|
| Method Summary | |
protected int |
getCount()
Returns the current count value. |
java.lang.String |
getGroup()
Returns the name of the group (possibly null) for 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 count value. |
void |
setGroup(java.lang.String group)
Setss the name of the group for this function. |
| Methods inherited from class org.jfree.report.function.AbstractFunction |
clone, getDataRow, getDependencyLevel, getInstance, 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 ItemCountFunction()
This constructor is intended for use by the SAX handler class only.
public ItemCountFunction(java.lang.String name)
name - The name of the function.
java.lang.NullPointerException - if the name is null| Method Detail |
protected int getCount()
protected void setCount(int count)
count - the current count value.public void reportInitialized(ReportEvent event)
reportInitialized in interface ReportListenerreportInitialized in class AbstractFunctionevent - the event.public java.lang.String getGroup()
public void setGroup(java.lang.String group)
group - The group name.public void groupStarted(ReportEvent event)
groupStarted in interface ReportListenergroupStarted in class AbstractFunctionevent - Information about the event.public void itemsAdvanced(ReportEvent event)
itemsAdvanced in interface ReportListeneritemsAdvanced in class AbstractFunctionevent - Information about the event.public java.lang.Object getValue()
getValue in interface Expression
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||