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

java.lang.Object
  extended by org.scilab.forge.scirenderer.ruler.graduations.AbstractGraduations
All Implemented Interfaces:
Graduations
Direct Known Subclasses:
LinearGraduations, LogarithmicGraduations

public abstract class AbstractGraduations
extends java.lang.Object
implements Graduations

Author:
Pierre Lando

Field Summary
protected  boolean isLowerBoundIncluded
           
protected  boolean isUpperBoundIncluded
           
protected  double lowerBound
           
protected  double upperBound
           
 
Constructor Summary
AbstractGraduations(double lowerBound, boolean lowerBoundIncluded, double upperBound, boolean upperBoundIncluded)
           
AbstractGraduations(double lowerBound, double upperBound)
           
AbstractGraduations(Graduations parentGraduations)
           
AbstractGraduations(Graduations parentGraduations, double lowerBound, boolean lowerBoundIncluded, double upperBound, boolean upperBoundIncluded)
           
 
Method Summary
 boolean contain(double value)
          Return true if the interval contain the given value.
 java.text.DecimalFormat getFormat()
          Return an adapted number format.
 double getLowerBound()
          Return the lower bound.
 Graduations getParentGraduations()
          Return the parent graduation.
 double getUpperBound()
          Return the upper bound.
 boolean isLowerBoundIncluded()
          Return true if the lower bound is included.
 boolean isUpperBoundIncluded()
          Return true if the lower bound is included.
 java.lang.String 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
getAllValues, getAlternative, getMore, getNewValues, getSubDensity, getSubGraduations
 

Field Detail

isLowerBoundIncluded

protected final boolean isLowerBoundIncluded

isUpperBoundIncluded

protected final boolean isUpperBoundIncluded

lowerBound

protected final double lowerBound

upperBound

protected final double upperBound
Constructor Detail

AbstractGraduations

public AbstractGraduations(Graduations parentGraduations)

AbstractGraduations

public AbstractGraduations(double lowerBound,
                           boolean lowerBoundIncluded,
                           double upperBound,
                           boolean upperBoundIncluded)

AbstractGraduations

public AbstractGraduations(double lowerBound,
                           double upperBound)

AbstractGraduations

public AbstractGraduations(Graduations parentGraduations,
                           double lowerBound,
                           boolean lowerBoundIncluded,
                           double upperBound,
                           boolean upperBoundIncluded)
Method Detail

getLowerBound

public double getLowerBound()
Description copied from interface: Graduations
Return the lower bound.

Specified by:
getLowerBound in interface Graduations
Returns:
the lower bound.

isLowerBoundIncluded

public boolean isLowerBoundIncluded()
Description copied from interface: Graduations
Return true if the lower bound is included.

Specified by:
isLowerBoundIncluded in interface Graduations
Returns:
true if the lower bound is included.

getUpperBound

public double getUpperBound()
Description copied from interface: Graduations
Return the upper bound.

Specified by:
getUpperBound in interface Graduations
Returns:
the upper bound.

isUpperBoundIncluded

public boolean isUpperBoundIncluded()
Description copied from interface: Graduations
Return true if the lower bound is included.

Specified by:
isUpperBoundIncluded in interface Graduations
Returns:
true if the lower bound is included.

getParentGraduations

public Graduations getParentGraduations()
Description copied from interface: Graduations
Return the parent graduation.

Specified by:
getParentGraduations in interface Graduations
Returns:
the parent graduation.

contain

public boolean contain(double value)
Description copied from interface: Graduations
Return true if the interval contain the given value.

Specified by:
contain in interface Graduations
Parameters:
value - the given value.
Returns:
true if the interval contain the given value.

getFormat

public java.text.DecimalFormat getFormat()
Description copied from interface: Graduations
Return an adapted number format.

Specified by:
getFormat in interface Graduations
Returns:
an adapted number format.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object