Class AxisScalePolicyTransformation
- java.lang.Object
-
- info.monitorenter.gui.chart.axis.scalepolicy.AxisScalePolicyTransformation
-
- All Implemented Interfaces:
IAxisScalePolicy
public class AxisScalePolicyTransformation extends java.lang.Object implements IAxisScalePolicy
Very basic implementation that has to be used with implementation ofAAxisTransformation
to have the scale transformed.- Author:
- Bill Schoolfield (contributor), Achim Westermann (modification)
-
-
Constructor Summary
Constructors Constructor Description AxisScalePolicyTransformation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<LabeledValue>
getScaleValues(java.awt.Graphics g2d, IAxis<?> axis)
Uses the transformation function callbacks (AAxisTransformation.transform(double)
,AAxisTransformation.untransform(double)
) of theAAxisTransformation
this instance may be used with to have the scale transformed accordingly.void
initPaintIteration(IAxis<?> axis)
Performs expensive calculations for various values that are used by many calls throughout a paint iterations.
-
-
-
Method Detail
-
getScaleValues
public java.util.List<LabeledValue> getScaleValues(java.awt.Graphics g2d, IAxis<?> axis)
Uses the transformation function callbacks (AAxisTransformation.transform(double)
,AAxisTransformation.untransform(double)
) of theAAxisTransformation
this instance may be used with to have the scale transformed accordingly.- Specified by:
getScaleValues
in interfaceIAxisScalePolicy
- Parameters:
g2d
- Provides information about the graphic context (e.g. font metrics).axis
- the axis to work for.- Returns:
- the labeled values that will be used by the
to paint labels.Chart2D
-
initPaintIteration
public void initPaintIteration(IAxis<?> axis)
Description copied from interface:IAxisScalePolicy
Performs expensive calculations for various values that are used by many calls throughout a paint iterations.These values are constant throughout a paint iteration by the contract that no point is added removed or changed in this period. Because these values are used from many methods it is impossible to calculate them at a "transparent" method that may perform this caching over a paint period without knowledge from outside. The first method called in a paint iteration is called several further times in the iteration. So this is the common hook to invoke before painting a chart.
- Specified by:
initPaintIteration
in interfaceIAxisScalePolicy
- Parameters:
axis
- the axis to read data from.
-
-