org.jplot2d.axtick
Class TAIMicrosTickCalculator
- java.lang.Object
-
- org.jplot2d.axtick.TickCalculator
-
- org.jplot2d.axtick.LongTickCalculator
-
- org.jplot2d.axtick.TAIMicrosTickCalculator
-
- All Implemented Interfaces:
- RangeAdvisor
public class TAIMicrosTickCalculator extends LongTickCalculator implements RangeAdvisor
-
-
Field Summary
-
Fields inherited from class org.jplot2d.axtick.TickCalculator
AUTO_MINORTICK_NUMBER, DOUBLE_PRECISION_TOLERANCE
-
-
Constructor Summary
Constructors Constructor and Description TAIMicrosTickCalculator(java.util.TimeZone zone, java.util.Locale locale)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringcalcLabelFormatString(java.lang.Object values)Calculate a proper format string to format the labels on given values.java.text.FormatcalcLabelTextFormat(java.lang.Object canonicalValues)Calculate a proper text format to format the labels on given values.voidcalcValuesByTickInterval(long interval, long offset, int minorTickNumber)voidcalcValuesByTickNumber(int tickNumber, int minorTickNumber)Calculate the tick values by the given tick number and minor ticks number.voidexpandRangeByTickInterval(double interval)voidexpandRangeByTickNumber(int tickNumber)The interval will be 1,2,5 * 10^nMathElement[]formatValues(java.lang.String format, java.lang.Object values)Returns a formatted string using the specified format string on the given value array.doublegetInterval()java.lang.StringgetLabelFormate()Returns a proper format string to format the labels on ticks values returned byTickCalculator.getValues().intgetMinorNumber()long[]getMinorValues()long[]getValues()booleanisValidFormat(java.lang.String format)Returns true if the given format is valid for this tick calculator-
Methods inherited from class org.jplot2d.axtick.LongTickCalculator
calcValuesByTickInterval, getInRangeValuesIdx, getRange, setRange
-
Methods inherited from class org.jplot2d.axtick.TickCalculator
formatValues
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jplot2d.axtick.RangeAdvisor
getRange, setRange
-
-
-
-
Constructor Detail
-
TAIMicrosTickCalculator
public TAIMicrosTickCalculator(java.util.TimeZone zone, java.util.Locale locale)
-
-
Method Detail
-
expandRangeByTickNumber
public void expandRangeByTickNumber(int tickNumber)
Description copied from interface:RangeAdvisorThe interval will be 1,2,5 * 10^n- Specified by:
expandRangeByTickNumberin interfaceRangeAdvisor
-
expandRangeByTickInterval
public void expandRangeByTickInterval(double interval)
- Specified by:
expandRangeByTickIntervalin interfaceRangeAdvisor
-
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(long interval, long offset, int minorTickNumber)- Specified by:
calcValuesByTickIntervalin classLongTickCalculator
-
getInterval
public double getInterval()
- Specified by:
getIntervalin interfaceRangeAdvisor- Specified by:
getIntervalin classTickCalculator- Returns:
- the tick interval.
-
getMinorNumber
public int getMinorNumber()
- Specified by:
getMinorNumberin classTickCalculator- Returns:
- the actual minor tick number.
-
getValues
public long[] getValues()
- Specified by:
getValuesin classLongTickCalculator- Returns:
- the tick values
-
getMinorValues
public long[] getMinorValues()
- Specified by:
getMinorValuesin classLongTickCalculator- Returns:
- the minor tick values
-
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
-
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
-
calcLabelFormatString
public java.lang.String calcLabelFormatString(java.lang.Object values)
Description copied from class:TickCalculatorCalculate a proper format string to format the labels on given values.- Overrides:
calcLabelFormatStringin classLongTickCalculator- Returns:
-
isValidFormat
public boolean isValidFormat(java.lang.String format)
Description copied from class:TickCalculatorReturns true if the given format is valid for this tick calculator- Specified by:
isValidFormatin classTickCalculator
-
formatValues
public MathElement[] formatValues(java.lang.String format, java.lang.Object values)
Description copied from class:TickCalculatorReturns a formatted string using the specified format string on the given value array.- Overrides:
formatValuesin classTickCalculator- Parameters:
format- A format string- Returns:
- A formatted string.
-
-
DMelt 3.0 © DataMelt by jWork.ORG