|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jCharts.axisChart.axis.scale.ScaleCalculator
public abstract class ScaleCalculator
Base class for the logic used to compute the scale on the charts. There are two implementations provided and you are free to implement your own if you do not like the default implementations provided.
Field Summary | |
---|---|
protected double |
increment
|
private double |
maxValue
|
private double |
minValue
|
private int |
numberOfScaleItems
|
private int |
roundingPowerOfTen
|
Constructor Summary | |
---|---|
ScaleCalculator()
|
Method Summary | |
---|---|
protected abstract void |
computeIncrement()
Computes the scale increment. |
void |
computeScaleValues()
Drives the computation of the axis increment and related values taking into account the user specified rounding criteria. |
double |
getIncrement()
|
double |
getMaxValue()
|
double |
getMinValue()
|
int |
getNumberOfScaleItems()
|
int |
getRoundingPowerOfTen()
|
protected double |
round(double value,
double powerOfTen)
Rounds the passed value by the power of ten specified |
protected void |
roundTheIncrement(double powerOfTen)
Rounds the scale increment up by the power of ten specified in the properties. |
void |
setMaxValue(double maxValue)
|
void |
setMinValue(double minValue)
|
void |
setNumberOfScaleItems(int numberOfScaleItems)
|
void |
setRoundingPowerOfTen(int powerOfTen)
Sets the exponent power of ten to round values to. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private double minValue
private double maxValue
private int roundingPowerOfTen
private int numberOfScaleItems
protected double increment
Constructor Detail |
---|
public ScaleCalculator()
Method Detail |
---|
protected abstract void computeIncrement()
public final void computeScaleValues()
public final void setMinValue(double minValue)
public final double getMinValue()
public final void setMaxValue(double maxValue)
public final double getMaxValue()
public final double getIncrement()
public int getNumberOfScaleItems()
public void setNumberOfScaleItems(int numberOfScaleItems)
public final void setRoundingPowerOfTen(int powerOfTen)
powerOfTen
- exponent of ten to round to: 1=10, 2=100, -2=.01public final int getRoundingPowerOfTen()
protected double round(double value, double powerOfTen)
value
- the value to roundpowerOfTen
- the product of 10 times the rounding property.
protected void roundTheIncrement(double powerOfTen)
powerOfTen
- the value of 10 times the rounding property.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |