org.jfree.report.function
Class TotalGroupSumQuotientPercentFunction

java.lang.Object
  |
  +--org.jfree.report.function.AbstractExpression
        |
        +--org.jfree.report.function.AbstractFunction
              |
              +--org.jfree.report.function.TotalGroupSumQuotientFunction
                    |
                    +--org.jfree.report.function.TotalGroupSumQuotientPercentFunction

public class TotalGroupSumQuotientPercentFunction
extends TotalGroupSumQuotientFunction

A report function that calculates the quotient of two summed fields (columns) from the TableModel. This function produces a global total. The total sum of the group is known when the group processing starts and the report is not performing a prepare-run. The sum is calculated in the prepare run and recalled in the printing run.

The function can be used in two ways:

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 tree parameters. The dividend parameter is required and denotes the name of an ItemBand-field which gets summed up as dividend. The divisor parameter is required and denotes the name of an ItemBand-field which gets summed up as divisor.

The parameter group denotes the name of a group. When this group is started, the counter gets reseted to null. This parameter is optional.

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
TotalGroupSumQuotientPercentFunction()
           
 
Method Summary
 java.lang.Object getValue()
          Return the current function value.
 
Methods inherited from class org.jfree.report.function.TotalGroupSumQuotientFunction
getDividend, getDivisor, getGroup, getInstance, groupStarted, itemsAdvanced, reportInitialized, setDividend, setDivisor, setGroup
 
Methods inherited from class org.jfree.report.function.AbstractFunction
clone, 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

TotalGroupSumQuotientPercentFunction

public TotalGroupSumQuotientPercentFunction()
Method Detail

getValue

public java.lang.Object getValue()
Description copied from class: TotalGroupSumQuotientFunction
Return the current function value.

The value depends (obviously) on the function implementation. For example, a page counting function will return the current page number.

Overrides:
getValue in class TotalGroupSumQuotientFunction
Tags copied from class: TotalGroupSumQuotientFunction
Returns:
The value of the function.