org.eclipse.birt.chart.computation.withaxes
Class AxisSubUnit

java.lang.Object
  extended by org.eclipse.birt.chart.computation.withaxes.AxisSubUnit

public final class AxisSubUnit
extends java.lang.Object

Computation unit for total, min, max and etc.


Method Summary
 void computeTotal(double dValue)
           
 double getLastPosition(double dValue)
          Gets the last position
 double getNegativeTotal()
           
 double getPositiveTotal()
           
 double getStackedValue(double dValue)
          Returns the current accumulated value.
 boolean isStackTogether()
          Returns if current positive and negative values are aggregated together or not
 void reset()
           
 void setLastPosition(double dValue, double dBaseLocation, double dMargin)
          Saves the last position and uses to compute current position by adding margin
 double stackValue(double dValue)
          Accumulates the value and returns the result.
 double valuePercentage(double dValue)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

reset

public final void reset()

isStackTogether

public boolean isStackTogether()
Returns if current positive and negative values are aggregated together or not

Returns:
true: together, false: by sign respectively

stackValue

public final double stackValue(double dValue)
Accumulates the value and returns the result.

Parameters:
dValue - the value to accumulate
Returns:
the result value after accumulating
See Also:
isStackTogether(), getStackedValue(double)

getStackedValue

public final double getStackedValue(double dValue)
Returns the current accumulated value.

Parameters:
dValue - value to check the sign. If stack together, it's no use.
Returns:
the current accumulated value.

computeTotal

public final void computeTotal(double dValue)

getPositiveTotal

public final double getPositiveTotal()

getNegativeTotal

public final double getNegativeTotal()

valuePercentage

public final double valuePercentage(double dValue)

setLastPosition

public final void setLastPosition(double dValue,
                                  double dBaseLocation,
                                  double dMargin)
Saves the last position and uses to compute current position by adding margin

Parameters:
dValue - value to check the max or min location
dBaseLocation - base location when last position is null
dMargin - margin location
See Also:
"https://bugs.eclipse.org/bugs/show_bug.cgi?id=182279"

getLastPosition

public final double getLastPosition(double dValue)
Gets the last position

Parameters:
dValue - value to check the max or min location


Copyright © 2005-2008 Actuate Corp. All rights reserved.