protected final class AAxisTransformation.XDataAccessor extends AAxis.XDataAccessor
m_chart| Constructor and Description |
|---|
XDataAccessor(Chart2D chart)
Creates an instance that accesses the given chart's x axis.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
scaleTrace(ITrace2D trace,
Range range)
Scales the given trace in the dimension represented by this axis.
|
double |
translatePxToValue(int pixel)
Transforms the given pixel value (which has to be a awt value like
MouseEvent.getX() into the chart value. |
int |
translateValueToPx(double value)
Transforms the given relative value into the relative chart pixel value
regarding the point's position.
|
getDimension, getHeight, getMaximumPixelForLabel, getMaxValue, getMinimumValueDistanceForLabels, getMinValue, getPixelRange, getValue, getValueDistanceForPixel, getWidth, toString, translateMousePosition, translatePxToValueRelativegetChartpublic XDataAccessor(Chart2D chart)
chart - the chart to access.protected void scaleTrace(ITrace2D trace, Range range)
AAxis.AChart2DDataAccessor
This method is not deadlock - safe and should be called by the
only!
Chart2D
scaleTrace in class AAxis.XDataAccessortrace - the trace to scale.range - the range to use as scaler.AAxis.XDataAccessor.scaleTrace(info.monitorenter.gui.chart.ITrace2D,
info.monitorenter.util.Range)public double translatePxToValue(int pixel)
AAxis.AChart2DDataAccessorMouseEvent.getX() into the chart value.
Internal use only, the interface does not guarantee that the pixel corresponds to any valid awt pixel value within the chart component.
Warning: A value transformed to a pixel by
AAxis.AChart2DDataAccessor.translateValueToPx(double) and then retransformed by
AAxis.AChart2DDataAccessor.translatePxToValue(int) will most often have changed, as the
transformation from value to px a) has to hit an exact int b) most often
will map from a bigger domain (value range) to a smaller one (range of
chart on the screen).
translatePxToValue in class AAxis.XDataAccessorpixel - a pixel value of the chart component as used by awt.AAxis.XDataAccessor.translatePxToValue(int)public final int translateValueToPx(double value)
AAxis.AChart2DDataAccessor
This must only be used when the chart dimensions (
Chart2D.getXChartEnd(), Chart2D.getXChartStart(), ...)
are already computed and valid.
translateValueToPx in class AAxis.XDataAccessorvalue - a relative pixel value of the chart component as used by awt.AAxis.XDataAccessor.translateValueToPx(double)Copyright © 2017. All rights reserved.