public class AxisScalePolicyTransformation extends Object implements IAxisScalePolicy
AAxisTransformation
to have the scale transformed.
Constructor and Description |
---|
AxisScalePolicyTransformation() |
Modifier and Type | Method and Description |
---|---|
List<LabeledValue> |
getScaleValues(Graphics2D g2d,
IAxis<?> axis)
Uses the transformation function callbacks (
AAxisTransformation.transform(double) , AAxisTransformation.untransform(double) )
of the AAxisTransformation 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.
|
public List<LabeledValue> getScaleValues(Graphics2D g2d, IAxis<?> axis)
AAxisTransformation.transform(double)
, AAxisTransformation.untransform(double)
)
of the AAxisTransformation
this instance may be used with to have the scale transformed accordingly.
getScaleValues
in interface IAxisScalePolicy
g2d
- Provides information about the graphic context (e.g. font
metrics).axis
- the axis to work for.Chart2D
to paint labels.public void initPaintIteration(IAxis<?> axis)
IAxisScalePolicy
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.
initPaintIteration
in interface IAxisScalePolicy
axis
- the axis to read data from.Copyright © 2019. All rights reserved.