Class AxisLabelProcessor


  • public class AxisLabelProcessor
    extends Object
    A helper class to process axis labels.
    Author:
    martin
    • Constructor Detail

      • AxisLabelProcessor

        public AxisLabelProcessor​(AxisBox axis)
    • Method Detail

      • axisLabelOffsetVertical

        protected Coord2d axisLabelOffsetVertical​(IPainter painter,
                                                  AxisRenderingInfo info,
                                                  Coord3d labelPosition,
                                                  int margin)
        Compute the offset to apply to a vertical Z label to avoid covering the tick labels. Retrieve pixel scale in view to adapt margin
        Parameters:
        painter -
        info -
        labelPosition -
        offset2D -
        margin -
      • axisLabelOffset

        protected Coord2d axisLabelOffset​(IPainter painter,
                                          AxisRenderingInfo info,
                                          Coord3d labelPosition,
                                          int margin)
        Offset for oblique labels
        Parameters:
        painter -
        info -
        labelPosition -
        margin -
        Returns:
      • axisLabelRotation

        protected float axisLabelRotation​(IPainter painter,
                                          int direction,
                                          Coord3d[] axisSegment)
        Compute axis label rotation according to settings and direction of the axis segment.
      • axisLabel

        protected String axisLabel​(int dimension)
        Return the axis label for the given direction.
      • axisLabelPosition

        protected Coord3d axisLabelPosition​(int direction,
                                            float tickLength,
                                            float axeLabelDist,
                                            Coord3d pos,
                                            Coord3d dir)
        Compute the axis label position according to the tick position (on the axis segment) and a direction for the tick.