All Implemented Interfaces:
Axis, ImageObserver, MenuContainer, Serializable, Accessible

public class HorizontalAxis extends DirectionlessAxis
HorizontalAxis defines a DirectionlessAxis.transform(Graphics2D, double, int, int) for drawing labels along the horizontal axis. The labels are slightly rotated to save space.
See Also:
  • Constructor Details

    • HorizontalAxis

      public HorizontalAxis()
      Creates a new instance.
  • Method Details

    • getSegmentCount

      protected int getSegmentCount()
      Specified by:
      getSegmentCount in class DirectionlessAxis
      Returns:
      number of segments (= number of labels - 1)
    • transform

      protected void transform(Graphics2D g, double coordinate, int labelWidth, int fontHeight)
      Description copied from class: DirectionlessAxis
      Transform a coordinate system in such a way that a label can be placed at the origin.
      Specified by:
      transform in class DirectionlessAxis
      Parameters:
      g - graphics context
      coordinate - computed coordinate of the label
      labelWidth - width of the label
      fontHeight - height of the label font