Class EmptyLabelHandler
- java.lang.Object
-
- com.metsci.glimpse.core.axis.painter.label.EmptyLabelHandler
-
- All Implemented Interfaces:
AxisLabelHandler
public class EmptyLabelHandler extends Object implements AxisLabelHandler
-
-
Constructor Summary
Constructors Constructor Description EmptyLabelHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAxisLabel(Axis1D axis)AxisUnitConvertergetAxisUnitConverter()double[]getMinorTickPositions(double[] tickPositions)Provides the positions of minor tick marks.String[]getTickLabels(Axis1D axis, double[] tickPositions)double[]getTickPositions(Axis1D axis)voidsetAxisLabel(String label)voidsetAxisUnitConverter(AxisUnitConverter converter)
-
-
-
Method Detail
-
getTickPositions
public double[] getTickPositions(Axis1D axis)
- Specified by:
getTickPositionsin interfaceAxisLabelHandler- Returns:
- an array containing positions of tick marks in axis coordinates (transformed by any AxisUnitConverter).
-
getTickLabels
public String[] getTickLabels(Axis1D axis, double[] tickPositions)
- Specified by:
getTickLabelsin interfaceAxisLabelHandlertickPositions- the output from getTickPositions( ).- Returns:
- an array of string labels for the tick marks provided by getTickPositions( ).
-
getMinorTickPositions
public double[] getMinorTickPositions(double[] tickPositions)
Description copied from interface:AxisLabelHandlerProvides 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.- Specified by:
getMinorTickPositionsin interfaceAxisLabelHandler- Returns:
- an array containing positions of minor tick marks in axis coordinates (transformed by any AxisUnitConverter).
-
getAxisLabel
public String getAxisLabel(Axis1D axis)
- Specified by:
getAxisLabelin interfaceAxisLabelHandler- Returns:
- a text label describing the axis (the type of data displayed, the units, etc...)
-
setAxisLabel
public void setAxisLabel(String label)
- Specified by:
setAxisLabelin interfaceAxisLabelHandler- Parameters:
label- provides a hint regarding what label information to display
-
getAxisUnitConverter
public AxisUnitConverter getAxisUnitConverter()
- Specified by:
getAxisUnitConverterin interfaceAxisLabelHandler- Returns:
- the current AxisUnitConverter (used to determine values returned by getTickPositions() and getTickLabels()
-
setAxisUnitConverter
public void setAxisUnitConverter(AxisUnitConverter converter)
- Specified by:
setAxisUnitConverterin interfaceAxisLabelHandler- Parameters:
converter- sets a new AxisUnitConverter
-
-