Package org.jzy3d.plot3d.primitives.axis
Class AxisLabelProcessor
- java.lang.Object
-
- org.jzy3d.plot3d.primitives.axis.AxisLabelProcessor
-
public class AxisLabelProcessor extends Object
A helper class to process axis labels.- Author:
- martin
-
-
Field Summary
Fields Modifier and Type Field Description protected AxisBox
axis
protected IAxisLayout
layout
-
Constructor Summary
Constructors Constructor Description AxisLabelProcessor(AxisBox axis)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
axisLabel(int dimension)
Return the axis label for the given direction.protected Coord2d
axisLabelOffset(IPainter painter, AxisRenderingInfo info, Coord3d labelPosition, int margin)
Offset for oblique labelsprotected 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.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.protected float
axisLabelRotation(IPainter painter, int direction, Coord3d[] axisSegment)
Compute axis label rotation according to settings and direction of the axis segment.protected void
drawAxisLabel(IPainter painter, int direction, Color color, BoundingBox3d ticksTxtBounds, Coord3d labelPosition, String axeLabel, float rotation, Coord2d offset)
-
-
-
Field Detail
-
axis
protected AxisBox axis
-
layout
protected IAxisLayout layout
-
-
Constructor Detail
-
AxisLabelProcessor
public AxisLabelProcessor(AxisBox axis)
-
-
Method Detail
-
drawAxisLabel
protected void drawAxisLabel(IPainter painter, int direction, Color color, BoundingBox3d ticksTxtBounds, Coord3d labelPosition, String axeLabel, float rotation, Coord2d offset)
-
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.
-
-