Interface AxisLabelHandler
-
- All Known Subinterfaces:
TimeAxisLabelHandler
- All Known Implementing Classes:
AbsoluteTimeAxisLabelHandler
,EmptyLabelHandler
,FixedAxisLabelHandler
,GridAxisExponentLabelHandler
,GridAxisLabelHandler
,GridAxisLabelHandlerSimpleUnits
,HdrAxisLabelHandler
,LatLonAxisLabelHandler
,RelativeTimeAxisLabelHandler
,SimpleAxisLabelHandler
,WrappedLabelHandler
public interface AxisLabelHandler
Responsible for positioning axis tick marks and their associated labels.- Author:
- ulman
- See Also:
GridAxisLabelHandler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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)
-
-
-
Method Detail
-
getTickPositions
double[] getTickPositions(Axis1D axis)
- Returns:
- an array containing positions of tick marks in axis coordinates (transformed by any AxisUnitConverter).
-
getTickLabels
String[] getTickLabels(Axis1D axis, double[] tickPositions)
- Parameters:
tickPositions
- the output from getTickPositions( ).- Returns:
- an array of string labels for the tick marks provided by getTickPositions( ).
-
getMinorTickPositions
double[] getMinorTickPositions(double[] tickPositions)
Provides the positions of minor tick marks. How these are rendered differently from regular tick marks can vary, but they will usually be smaller and will not have labels. The positions of the major ticks are provided as input, since the minor tick positions are usually based on these. However, implementations of AxisLabelHandler are free to ignore this argument.- Returns:
- an array containing positions of minor tick marks in axis coordinates (transformed by any AxisUnitConverter).
-
getAxisLabel
String getAxisLabel(Axis1D axis)
- Returns:
- a text label describing the axis (the type of data displayed, the units, etc...)
-
setAxisLabel
void setAxisLabel(String label)
- Parameters:
label
- provides a hint regarding what label information to display
-
getAxisUnitConverter
AxisUnitConverter getAxisUnitConverter()
- Returns:
- the current AxisUnitConverter (used to determine values returned by getTickPositions() and getTickLabels()
-
setAxisUnitConverter
void setAxisUnitConverter(AxisUnitConverter converter)
- Parameters:
converter
- sets a new AxisUnitConverter
-
-