Module org.jfree.chart3d
Package org.jfree.chart3d.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

Modifier and Type
Method
Description
`void`
`addChangeListener(Axis3DChangeListener listener)`
Registers a listener so that it receives notification of changes to the axis.
`void`
`draw(Graphics2D g2, Point2D startPt, Point2D endPt, Point2D opposingPt, List<TickData> tickData, RenderingInfo info, boolean hinting)`
Draws the axis along an arbitrary line (between `startPt` and `endPt`).
`Color`
`getLabelColor()`
Returns the color used to draw the axis label.
`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).
`Color`
`getTickLabelColor()`
Returns the color used to draw the axis tick labels.
`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(Color color)`
Sets the color used to draw the axis label and sends an `Axis3DChangeEvent` to all registered listeners.
`void`
`setLabelFont(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(Color color)`
Sets the color used to draw the axis tick labels and sends an `Axis3DChangeEvent` to all registered listeners.
`void`
`setTickLabelFont(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 org.jfree.chart3d.ChartElement

`receive`

## Method Details

### 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

Font getLabelFont()
Returns the font that is used to display the main axis label.

Returns:
  The font (never `null`).

### setLabelFont

void setLabelFont(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

Color getLabelColor()
Returns the color used to draw the axis label.

Returns:
  The color (never `null`).
Since:
  1.2

### setLabelColor

void setLabelColor(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

Font getTickLabelFont()
Returns the font that is used to display the tick labels.

Returns:
  The font (never `null`).

### setTickLabelFont

void setTickLabelFont(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

Color getTickLabelColor()
Returns the color used to draw the axis tick labels.

Returns:
  The color (never `null`).
Since:
  1.2

### setTickLabelColor

void setTickLabelColor(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(Graphics2D g2, Point2D startPt, Point2D endPt, Point2D opposingPt, 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).