public class GridAxisLabelHandler extends Object implements AxisLabelHandler
For example, an axis with min and max values of 0.001 and 0.006 might have tick values displayed as "1.0" or "6.0" with "(x 1,000)" specified in the axis label.
Constructor and Description |
---|
GridAxisLabelHandler() |
Modifier and Type | Method and Description |
---|---|
String |
getAxisLabel(Axis1D axis) |
AxisUnitConverter |
getAxisUnitConverter() |
double[] |
getMinorTickPositions(double[] tickPositions)
Provides the positions of minor tick marks.
|
String[] |
getTickLabels(Axis1D axis,
double[] tickPositions) |
double[] |
getTickPositions(Axis1D axis) |
void |
setAxisLabel(String label) |
void |
setAxisUnitConverter(AxisUnitConverter converter) |
void |
setAxisUnits(String units,
boolean abbreviated) |
void |
setAxisUnits(String milliUnits,
String units,
String kiloUnits) |
void |
setMinorTickCount(int count) |
void |
setTickSpacing(int spacing) |
public AxisUnitConverter getAxisUnitConverter()
getAxisUnitConverter
in interface AxisLabelHandler
public void setAxisUnitConverter(AxisUnitConverter converter)
setAxisUnitConverter
in interface AxisLabelHandler
converter
- sets a new AxisUnitConverterpublic double[] getTickPositions(Axis1D axis)
getTickPositions
in interface AxisLabelHandler
public String[] getTickLabels(Axis1D axis, double[] tickPositions)
getTickLabels
in interface AxisLabelHandler
tickPositions
- the output from getTickPositions( ).public double[] getMinorTickPositions(double[] tickPositions)
AxisLabelHandler
getMinorTickPositions
in interface AxisLabelHandler
public String getAxisLabel(Axis1D axis)
getAxisLabel
in interface AxisLabelHandler
public void setTickSpacing(int spacing)
public void setMinorTickCount(int count)
public void setAxisLabel(String label)
setAxisLabel
in interface AxisLabelHandler
label
- provides a hint regarding what label information to displaypublic void setAxisUnits(String units, boolean abbreviated)
Copyright © 2013 Metron, Inc.. All rights reserved.