org.jplot2d.axtick
Class ReciprocalTickCalculator
- java.lang.Object
-
- org.jplot2d.axtick.TickCalculator
-
- org.jplot2d.axtick.DoubleTickCalculator
-
- org.jplot2d.axtick.ReciprocalTickCalculator
-
public class ReciprocalTickCalculator extends DoubleTickCalculator
A TickCalculator for reciprocal. A reciprocal ticks contains a primary tick zone, with a end tick value is multiple of the other end. The reasonable multiplying factor is 4.
-
-
Field Summary
-
Fields inherited from class org.jplot2d.axtick.TickCalculator
AUTO_MINORTICK_NUMBER, DOUBLE_PRECISION_TOLERANCE
-
-
Constructor Summary
Constructors Constructor and Description ReciprocalTickCalculator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.text.FormatcalcLabelTextFormat(java.lang.Object canonicalValues)Calculate a proper text format to format the labels on given values.voidcalcValuesByTickInterval(double interval, double offset, int minorTickNumber)Calculate the tick values by the given interval and minor ticks number.voidcalcValuesByTickNumber(int tickNumber, int minorTickNumber)Calculate the tick values by the given tick number and minor ticks number.doublegetInterval()java.lang.StringgetLabelFormate()Returns a proper format string to format the labels on ticks values returned byTickCalculator.getValues().intgetMinorNumber()double[]getMinorValues()double[]getValues()-
Methods inherited from class org.jplot2d.axtick.DoubleTickCalculator
calcLabelFormatString, convFCm2e, getInRangeValuesIdx, getRange, isValidFormat, setRange
-
Methods inherited from class org.jplot2d.axtick.TickCalculator
formatValues, formatValues
-
-
-
-
Method Detail
-
calcValuesByTickNumber
public void calcValuesByTickNumber(int tickNumber, int minorTickNumber)Description copied from class:TickCalculatorCalculate the tick values by the given tick number and minor ticks number. The minor ticks number is a proposed value, and may be different from actual minor ticks number returned byTickCalculator.getMinorNumber().- Specified by:
calcValuesByTickNumberin classTickCalculatorminorTickNumber- if the given number isTickCalculator.AUTO_MINORTICK_NUMBER, the tick number is automatically chosen.
-
calcValuesByTickInterval
public void calcValuesByTickInterval(double interval, double offset, int minorTickNumber)Description copied from class:TickCalculatorCalculate the tick values by the given interval and minor ticks number. The minor ticks number is a proposed value, and may be different from actual minor ticks number returned byTickCalculator.getMinorNumber().- Specified by:
calcValuesByTickIntervalin classTickCalculatorminorTickNumber- if the given number isTickCalculator.AUTO_MINORTICK_NUMBER, the tick number is derived from interval.
-
getInterval
public double getInterval()
- Specified by:
getIntervalin classTickCalculator- Returns:
- the tick interval.
-
getMinorNumber
public int getMinorNumber()
- Specified by:
getMinorNumberin classTickCalculator- Returns:
- the actual minor tick number.
-
getValues
public double[] getValues()
- Specified by:
getValuesin classDoubleTickCalculator- Returns:
- the tick values
-
getMinorValues
public double[] getMinorValues()
- Specified by:
getMinorValuesin classDoubleTickCalculator- Returns:
- the minor tick values
-
calcLabelTextFormat
public java.text.Format calcLabelTextFormat(java.lang.Object canonicalValues)
Description copied from class:TickCalculatorCalculate a proper text format to format the labels on given values. A calculator can just returns a text format and do not provide a format string (returns a empty string). If The returned text format isnull, a proper format string must be provided.- Specified by:
calcLabelTextFormatin classTickCalculator- Returns:
- a text format object
-
getLabelFormate
public java.lang.String getLabelFormate()
Description copied from class:TickCalculatorReturns a proper format string to format the labels on ticks values returned byTickCalculator.getValues(). Some calculator can derive format from its internal status directly.- Specified by:
getLabelFormatein classTickCalculator
-
-
DMelt 3.0 © DataMelt by jWork.ORG