com.orsoncharts.axis

## Interface Axis3D

- All Superinterfaces:
    ChartElement
  All Known Subinterfaces:
    CategoryAxis3D, ValueAxis3D
  All Known Implementing Classes:
    AbstractAxis3D, AbstractValueAxis3D, LogAxis3D, NumberAxis3D, StandardCategoryAxis3D

      public interface Axis3D
      extends ChartElement

  An interface that must be supported by axes for 3D plots.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addChangeListener(Axis3DChangeListener listener)` Registers a listener so that it receives notification of changes to the axis.
    `void` | `draw(java.awt.Graphics2D g2, java.awt.geom.Point2D startPt, java.awt.geom.Point2D endPt, java.awt.geom.Point2D opposingPt, java.util.List<TickData> tickData, RenderingInfo info, boolean hinting)` Draws the axis along an arbitrary line (between `startPt` and `endPt`).
    `java.awt.Color` | `getLabelColor()` Returns the color used to draw the axis label.
    `java.awt.Font` | `getLabelFont()` Returns the font that is used to display the main axis label.
    `Range` | `getRange()` Returns the axis range (the minimum and maximum values displayed on the axis).
    `java.awt.Color` | `getTickLabelColor()` Returns the color used to draw the axis tick labels.
    `java.awt.Font` | `getTickLabelFont()` Returns the font that is used to display the tick labels.
    `boolean` | `isInverted()` Returns the flag that determines whether or not the order of values on the axis is inverted.
    `boolean` | `isVisible()` Returns the flag that determines whether or not the axis is drawn on the chart.
    `void` | `removeChangeListener(Axis3DChangeListener listener)` Deregisters a listener so that it no longer receives notification of changes to the axis.
    `void` | `setInverted(boolean inverted)` Sets the flag that determines whether or not the order of values on the axis is inverted, and sends an `Axis3DChangeEvent` to all registered listeners.
    `void` | `setLabelColor(java.awt.Color color)` Sets the color used to draw the axis label and sends an `Axis3DChangeEvent` to all registered listeners.
    `void` | `setLabelFont(java.awt.Font font)` Sets the font for the axis label (the main label, not the tick labels) and sends an `Axis3DChangeEvent` to all registered listeners.
    `void` | `setRange(double min, double max)` Sets the axis range and sends an `Axis3DChangeEvent` to all registered listeners.
    `void` | `setRange(Range range)` Sets the axis range and sends an `Axis3DChangeEvent` to all registered listeners.
    `void` | `setTickLabelColor(java.awt.Color color)` Sets the color used to draw the axis tick labels and sends an `Axis3DChangeEvent` to all registered listeners.
    `void` | `setTickLabelFont(java.awt.Font font)` Sets the font for the tick labels and sends an `Axis3DChangeEvent` to all registered listeners.
    `void` | `setVisible(boolean visible)` Sets the flag that determines whether or not the axis is drawn on the chart and sends an `Axis3DChangeEvent` to all registered listeners.
    `double` | `translateToWorld(double value, double length)` Translates a data value to a world coordinate.

    - ### Methods inherited from interface com.orsoncharts.ChartElement

      `receive`

- - ### Method Detail

    - #### isVisible

          boolean isVisible()

      Returns the flag that determines whether or not the axis is drawn on the chart.
      Returns:
        A boolean.
      See Also:
        `setVisible(boolean)`

    - #### setVisible

          void setVisible(boolean visible)

      Sets the flag that determines whether or not the axis is drawn on the chart and sends an `Axis3DChangeEvent` to all registered listeners.
      Parameters:
        `visible` - the flag.
      See Also:
        `isVisible()`

    - #### getLabelFont

          java.awt.Font getLabelFont()

      Returns the font that is used to display the main axis label.
      Returns:
        The font (never `null`).

    - #### setLabelFont

          void setLabelFont(java.awt.Font font)

      Sets the font for the axis label (the main label, not the tick labels) and sends an `Axis3DChangeEvent` to all registered listeners.
      Parameters:
        `font` - the font (`null` not permitted).

    - #### getLabelColor

          java.awt.Color getLabelColor()

      Returns the color used to draw the axis label.
      Returns:
        The color (never `null`).
      Since:
        1.2

    - #### setLabelColor

          void setLabelColor(java.awt.Color color)

      Sets the color used to draw the axis label and sends an `Axis3DChangeEvent` to all registered listeners.
      Parameters:
        `color` - the color (`null` not permitted).
      Since:
        1.2

    - #### getTickLabelFont

          java.awt.Font getTickLabelFont()

      Returns the font that is used to display the tick labels.
      Returns:
        The font (never `null`).

    - #### setTickLabelFont

          void setTickLabelFont(java.awt.Font font)

      Sets the font for the tick labels and sends an `Axis3DChangeEvent` to all registered listeners.
      Parameters:
        `font` - the font (`null` not permitted).

    - #### getTickLabelColor

          java.awt.Color getTickLabelColor()

      Returns the color used to draw the axis tick labels.
      Returns:
        The color (never `null`).
      Since:
        1.2

    - #### setTickLabelColor

          void setTickLabelColor(java.awt.Color color)

      Sets the color used to draw the axis tick labels and sends an `Axis3DChangeEvent` to all registered listeners.
      Parameters:
        `color` - the color (`null` not permitted).
      Since:
        1.2

    - #### getRange

          Range getRange()

      Returns the axis range (the minimum and maximum values displayed on the axis). Note that even categorical axes will have a range, although since numerical values are not displayed the range is often set to `(0.0, 1.0)` for convenience.
      Returns:
        The axis range (never `null`).

    - #### setRange

          void setRange(Range range)

      Sets the axis range and sends an `Axis3DChangeEvent` to all registered listeners.
      Parameters:
        `range` - the range (`null` not permitted).

    - #### setRange

          void setRange(double min,
                        double max)

      Sets the axis range and sends an `Axis3DChangeEvent` to all registered listeners.
      Parameters:
        `min` - the lower bound for the axis.
        `max` - the upper bound for the axis.

    - #### isInverted

          boolean isInverted()

      Returns the flag that determines whether or not the order of values on the axis is inverted. The default value is `false`.
      Returns:
        A boolean.
      Since:
        1.5

    - #### setInverted

          void setInverted(boolean inverted)

      Sets the flag that determines whether or not the order of values on the axis is inverted, and sends an `Axis3DChangeEvent` to all registered listeners.
      Parameters:
        `inverted` - the new flag value.
      Since:
        1.5

    - #### translateToWorld

          double translateToWorld(double value,
                                  double length)

      Translates a data value to a world coordinate. Since we draw the charts in a box that has one corner at `(0, 0, 0)`, we only need to know the length of the side of the box along which we are translating in order to do the calculation.
      Parameters:
        `value` - the data value.
        `length` - the box side length.
      Returns:
        The translated value.

    - #### draw

          void draw(java.awt.Graphics2D g2,
                    java.awt.geom.Point2D startPt,
                    java.awt.geom.Point2D endPt,
                    java.awt.geom.Point2D opposingPt,
                    java.util.List<TickData> tickData,
                    RenderingInfo info,
                    boolean hinting)

      Draws the axis along an arbitrary line (between `startPt` and `endPt`). The opposing point is used as a reference point to know on which side of the axis to draw the labels.
      Parameters:
        `g2` - the graphics target (`null` not permitted).
        `startPt` - the starting point (`null` not permitted).
        `endPt` - the end point (`null` not permitted)
        `opposingPt` - an opposing point (`null` not permitted).
        `tickData` - info about the ticks to draw (`null` not permitted).
        `info` - an object to be populated with rendering info (`null` permitted).
        `hinting` - a flag that controls whether or not element hinting should be performed.
      Since:
        1.3

    - #### addChangeListener

          void addChangeListener(Axis3DChangeListener listener)

      Registers a listener so that it receives notification of changes to the axis.
      Parameters:
        `listener` - the listener (`null` not permitted).

    - #### removeChangeListener

          void removeChangeListener(Axis3DChangeListener listener)

      Deregisters a listener so that it no longer receives notification of changes to the axis.
      Parameters:
        `listener` - the listener (`null` not permitted).