info.monitorenter.gui.chart.axis
Class AxisInverse.YDataInverseAccessor

java.lang.Object
  extended by info.monitorenter.gui.chart.axis.AAxis.AChart2DDataAccessor
      extended by info.monitorenter.gui.chart.axis.AAxis.YDataAccessor
          extended by info.monitorenter.gui.chart.axis.AxisInverse.YDataInverseAccessor
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
AxisInverse<T extends IAxisScalePolicy>

protected class AxisInverse.YDataInverseAccessor
extends AAxis.YDataAccessor

Accesses the y axis of the Chart2D.

See Also:
AAxis.setAccessor(info.monitorenter.gui.chart.axis.AAxis.AChart2DDataAccessor), Chart2D.getAxisY(), Serialized Form

Field Summary
 
Fields inherited from class info.monitorenter.gui.chart.axis.AAxis.AChart2DDataAccessor
m_chart
 
Constructor Summary
AxisInverse.YDataInverseAccessor(Chart2D chart)
          Creates an instance that accesses the y axis of the given chart.
 
Method Summary
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.
 
Methods inherited from class info.monitorenter.gui.chart.axis.AAxis.YDataAccessor
getDimension, getHeight, getMaximumPixelForLabel, getMaxValue, getMinimumValueDistanceForLabels, getMinValue, getPixelRange, getValue, getValueDistanceForPixel, getWidth, toString, translateMousePosition, translateValueToPx
 
Methods inherited from class info.monitorenter.gui.chart.axis.AAxis.AChart2DDataAccessor
getChart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AxisInverse.YDataInverseAccessor

public AxisInverse.YDataInverseAccessor(Chart2D chart)
Creates an instance that accesses the y axis of the given chart.

Parameters:
chart - the chart to access.
Method Detail

scaleTrace

protected void scaleTrace(ITrace2D trace,
                          Range range)
Description copied from class: AAxis.AChart2DDataAccessor
Scales the given trace in the dimension represented by this axis.

This method is not deadlock - safe and should be called by the Chart2D only!

Overrides:
scaleTrace in class AAxis.YDataAccessor
Parameters:
trace - the trace to scale.
range - the range to use as scaler.
See Also:
AAxis.AChart2DDataAccessor.scaleTrace(info.monitorenter.gui.chart.ITrace2D, info.monitorenter.util.Range)

translatePxToValue

public double translatePxToValue(int pixel)
Description copied from class: AAxis.AChart2DDataAccessor
Transforms the given pixel value (which has to be a awt value like MouseEvent.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).

Overrides:
translatePxToValue in class AAxis.YDataAccessor
Parameters:
pixel - a pixel value of the chart component as used by awt.
Returns:
the awt pixel value transformed to the chart value.
See Also:
AAxis.AChart2DDataAccessor.translatePxToValue(int)


Copyright © 2001 - 2010 LGPL, All Rights Footloose.