|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.jfree.report.function.AbstractExpression
|
+--org.jfree.report.function.AbstractFunction
|
+--org.jfree.report.function.ItemPercentageFunction
Calculates the percentage value of a numeric field. The total sum is taken and divided by the number of items counted.
| Constructor Summary | |
ItemPercentageFunction()
Creates a new ItemPercentageFunction. |
|
| Method Summary | |
java.lang.Object |
clone()
Returns a clone of the function. |
java.lang.String |
getField()
Returns the field used by the function. |
java.lang.String |
getGroup()
Returns the group name. |
Expression |
getInstance()
Return a completly separated copy of this function. |
java.lang.Object |
getValue()
Return the current function value. |
void |
groupStarted(ReportEvent event)
Receives notification that a group has started. |
void |
itemsAdvanced(ReportEvent event)
Receives notification that a row of data is being processed. |
void |
reportInitialized(ReportEvent event)
Receives notification that the report has started. |
void |
setField(java.lang.String field)
Sets the field name for the function. |
void |
setGroup(java.lang.String name)
Sets the group name. |
| Methods inherited from class org.jfree.report.function.AbstractFunction |
groupFinished,
itemsFinished,
itemsStarted,
reportDone,
reportFinished,
reportStarted |
| Methods inherited from class org.jfree.report.function.AbstractExpression |
getDataRow,
getDependencyLevel,
getName,
getReportConfiguration,
getResourceBundleFactory,
getRuntime,
isActive,
setActive,
setDependencyLevel,
setName,
setRuntime |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public ItemPercentageFunction()
| Method Detail |
public void groupStarted(ReportEvent event)
event - the event.public void itemsAdvanced(ReportEvent event)
event - the event.public void reportInitialized(ReportEvent event)
event - the event.public java.lang.Object getValue()
Don not count on the correctness of this function until the preparerun has finished.
public java.lang.String getGroup()
public void setGroup(java.lang.String name)
If a group is defined, the minimum value is reset to zero at the start of every instance of this group.
name - the group name (null permitted).public java.lang.String getField()
The field name corresponds to a column name in the report's TableModel.
public void setField(java.lang.String field)
The field name corresponds to a column name in the report's TableModel.
field - the field name (null not permitted).
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Be aware, this does not create a deep copy. If you have complex strucures contained in objects, you have to overwrite this function.
public Expression getInstance()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||