org.scilab.forge.scirenderer.ruler.graduations
Class LinearGraduations

java.lang.Object
  extended by org.scilab.forge.scirenderer.ruler.graduations.AbstractGraduations
      extended by org.scilab.forge.scirenderer.ruler.graduations.LinearGraduations
All Implemented Interfaces:
Graduations

public final class LinearGraduations
extends AbstractGraduations
implements Graduations

A linear graduation is a graduation with regular spaces mark. The mark distance is called "Step" and have for value mantissa x 10^exponent. Where mantissa is 1, 2 or 5. Exponent is an integer.

Author:
Pierre Lando

Field Summary
protected  int stepExponent
          The step exponent.
protected  int stepMantissa
          The step mantissa.
 
Method Summary
static LinearGraduations create(double lowerBound, boolean lowerBoundIncluded, double upperBound, boolean upperBoundIncluded)
           
static LinearGraduations create(double lowerBound, double upperBound)
           
static LinearGraduations create(Graduations parentGraduations, double lowerBound, boolean lowerBoundIncluded, double upperBound, boolean upperBoundIncluded)
           
 java.util.List<java.lang.Double> getAllValues()
          Return all values of this graduation.
 LinearGraduations getAlternative()
          Return a child graduation with more values but less than getMore()
 LinearGraduations getMore()
          Return a child graduation with more values.
 java.util.List<java.lang.Double> getNewValues()
          Return values not present in parents graduations.
 int getSubDensity()
          Return the density of sub ticks.
 Graduations getSubGraduations()
          Return a child graduation for sub ticks.
 
Methods inherited from class org.scilab.forge.scirenderer.ruler.graduations.AbstractGraduations
contain, getFormat, getLowerBound, getParentGraduations, getUpperBound, isLowerBoundIncluded, isUpperBoundIncluded, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.scilab.forge.scirenderer.ruler.graduations.Graduations
contain, getFormat, getLowerBound, getParentGraduations, getUpperBound, isLowerBoundIncluded, isUpperBoundIncluded
 

Field Detail

stepExponent

protected final int stepExponent
The step exponent.


stepMantissa

protected final int stepMantissa
The step mantissa.

Method Detail

create

public static LinearGraduations create(double lowerBound,
                                       double upperBound)

create

public static LinearGraduations create(Graduations parentGraduations,
                                       double lowerBound,
                                       boolean lowerBoundIncluded,
                                       double upperBound,
                                       boolean upperBoundIncluded)

create

public static LinearGraduations create(double lowerBound,
                                       boolean lowerBoundIncluded,
                                       double upperBound,
                                       boolean upperBoundIncluded)

getNewValues

public java.util.List<java.lang.Double> getNewValues()
Description copied from interface: Graduations
Return values not present in parents graduations.

Specified by:
getNewValues in interface Graduations
Returns:
values not present in parents graduations.

getAllValues

public java.util.List<java.lang.Double> getAllValues()
Description copied from interface: Graduations
Return all values of this graduation.

Specified by:
getAllValues in interface Graduations
Returns:
all values of this graduation.

getMore

public LinearGraduations getMore()
Description copied from interface: Graduations
Return a child graduation with more values.

Specified by:
getMore in interface Graduations
Returns:
a child graduation with more values.

getAlternative

public LinearGraduations getAlternative()
Description copied from interface: Graduations
Return a child graduation with more values but less than getMore()

Specified by:
getAlternative in interface Graduations
Returns:
a child graduation with more values but less than getMore()

getSubGraduations

public Graduations getSubGraduations()
Description copied from interface: Graduations
Return a child graduation for sub ticks.

Specified by:
getSubGraduations in interface Graduations
Returns:
a child graduation for sub ticks.

getSubDensity

public int getSubDensity()
Description copied from interface: Graduations
Return the density of sub ticks.

Specified by:
getSubDensity in interface Graduations
Returns:
the density of sub ticks.