|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.monitorenter.gui.chart.axis.AAxis
info.monitorenter.gui.chart.axis.AAxisTransformation
public abstract class AAxisTransformation
Base class for Axis implementations that transform the scale for changed display.
Nested Class Summary | |
---|---|
class |
AAxisTransformation.XDataAccessor
An accessor for the x axis of a chart. |
class |
AAxisTransformation.YDataAccessor
Accesses the y axis of the Chart2D . |
Nested classes/interfaces inherited from class info.monitorenter.gui.chart.axis.AAxis |
---|
AAxis.AChart2DDataAccessor |
Field Summary |
---|
Fields inherited from class info.monitorenter.gui.chart.axis.AAxis |
---|
m_accessor, m_formatter, m_majorTickSpacing, m_minorTickSpacing, m_power |
Fields inherited from interface info.monitorenter.gui.chart.IAxis |
---|
PROPERTY_LABELFORMATTER, PROPERTY_PAINTGRID, PROPERTY_RANGEPOLICY, PROPERTY_TITLE, PROPERTY_TITLEFONT, PROPERTY_TITLEPAINTER |
Constructor Summary | |
---|---|
AAxisTransformation()
Creates a default instance that will use a LabelFormatterAutoUnits for formatting
labels. |
|
AAxisTransformation(IAxisLabelFormatter formatter)
Creates an instance that will the given label formatter for formatting labels. |
Method Summary | |
---|---|
protected AAxis.AChart2DDataAccessor |
createAccessor(Chart2D chart,
int dimension)
Template method to create the proper
implementation. |
double |
getMax()
The maximum value access method for the Axis this instance is aggregated to. |
double |
getMin()
Returns the minimum value access method for the Axis this instance is aggregated to. |
double |
getScaledValue(double absolute)
Deprecated. replaced by AAxis.scaleTrace(ITrace2D) |
protected abstract double |
transform(double in)
Template method for performing the axis transformation. |
double |
translateMousePosition(MouseEvent mouseEvent)
Returns the translation of the mouse event coordinates of the given mouse event to the value within the chart for the dimension (x,y) covered by this axis. |
double |
translatePxToValue(int pixel)
Transforms the given pixel value (which has to be a awt value like MouseEvent.getY() into the chart value. |
protected abstract double |
untransform(double in)
Template method for performing the reverse axis transformation. |
Methods inherited from class info.monitorenter.gui.chart.axis.AAxis |
---|
addPropertyChangeListener, addTrace, getAccessor, getDimension, getFormatter, getHeight, getLabels, getMajorTickSpacing, getMinorTickSpacing, getPropertyChangeListeners, getRange, getRangePolicy, getScaleValues, getTitle, getTitlePainter, getValueDistanceForPixel, getWidth, initPaintIteration, isPaintGrid, isPaintScale, isStartMajorTick, paintTitle, propertyChange, removePropertyChangeListener, removeTrace, replace, roundToTicks, scale, scaleTrace, setAccessor, setChart, setFormatter, setMajorTickSpacing, setMinorTickSpacing, setPaintGrid, setPaintScale, setRange, setRangePolicy, setStartMajorTick, setTitle, setTitlePainter, translateValueToPx |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AAxisTransformation()
LabelFormatterAutoUnits
for formatting
labels.
public AAxisTransformation(IAxisLabelFormatter formatter)
formatter
- needed for formatting labels of this axis.Method Detail |
---|
protected AAxis.AChart2DDataAccessor createAccessor(Chart2D chart, int dimension)
AAxis
AAxis.AChart2DDataAccessor
implementation.
createAccessor
in class AAxis
chart
- the chart to access.dimension
- Chart2D.X
or Chart2D.Y
.
AAxis.AChart2DDataAccessor
implementation.AAxis.createAccessor(info.monitorenter.gui.chart.Chart2D,
int)
public double getMax()
AAxis
It supports the retrieval of data from the corrcet dimension of the connected Chart2 (X or Y)
as well as the respect to the configured IRangePolicy
.
getMax
in class AAxis
AAxis.getMax()
public double getMin()
AAxis
It supports the retrieval of data from the corrcet dimension of the connected Chart2 (X or Y)
as well as the respect to the configured IRangePolicy
.
getMin
in class AAxis
AAxis.getMin()
public final double getScaledValue(double absolute)
AAxis.scaleTrace(ITrace2D)
IAxis
If the given absolute value is not in the display- range of the
Chart2D
, negative values or values greater than 1.0 may
result.
absolute
- a value in the real value range of the corresponding chart.
IAxis.getScaledValue(double)
protected abstract double transform(double in) throws IllegalArgumentException
The argument should not be negative, so only normalized values (no chart values but their scaled values or pixel values) should be given here.
in
- the value to transform.
IllegalArgumentException
- if scaling is impossible (due to some mathematical transformation in
implementations like AxisLog10
public final double translateMousePosition(MouseEvent mouseEvent) throws IllegalArgumentException
AAxis
Note that the mouse event has to be an event fired on the correspondinig chart component!
translateMousePosition
in class AAxis
mouseEvent
- a mouse event that has been fired on this component.
IllegalArgumentException
- if the given mouse event is out of the current graphics context (not a mouse event
of the chart component).AAxis.translateMousePosition(java.awt.event.MouseEvent)
public double translatePxToValue(int pixel)
IAxis
MouseEvent.getY()
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.
translatePxToValue
in interface IAxis
translatePxToValue
in class AAxis
pixel
- a pixel value of the chart component as used by awt.
AAxis.translatePxToValue(int)
protected abstract double untransform(double in)
This is the counterpart to transform(double)
.
in
- the transformed value.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |