Module org.jfree.chart3d
Package org.jfree.chart3d.renderer.xyz

# Class AbstractXYZRenderer

java.lang.Object
org.jfree.chart3d.renderer.AbstractRenderer3D
org.jfree.chart3d.renderer.xyz.AbstractXYZRenderer

All Implemented Interfaces:
  `Serializable`, `ChartElement`, `Renderer3D`

Direct Known Subclasses:
  `BarXYZRenderer`, `LineXYZRenderer`, `ScatterXYZRenderer`, `SurfaceRenderer`

public class AbstractXYZRenderer extends AbstractRenderer3D
An abstract base class that can be used to create new `XYZRenderer` subclasses.

See Also:
  - Serialized Form

## Field Summary

### Fields inherited from interface org.jfree.chart3d.renderer.Renderer3D

`TRANSPARENT_COLOR`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`AbstractXYZRenderer()`
Creates a new default instance.

## Method Summary

Modifier and Type
Method
Description
`void`
`composeAll(XYZPlot plot, World world, Dimension3D dimensions, double xOffset, double yOffset, double zOffset)`
Adds objects to the `world` to represent all the data items that this renderer is responsible for.
`boolean`
`equals(Object obj)`
Tests this renderer for equality with an arbitrary object.
`Range`
`findXRange(XYZDataset dataset)`
Returns the range that is required on the x-axis for this renderer to display all the items in the specified dataset.
`Range`
`findYRange(XYZDataset dataset)`
Returns the range that is required on the y-axis for this renderer to display all the items in the specified dataset.
`Range`
`findZRange(XYZDataset dataset)`
Returns the range that is required on the z-axis for this renderer to display all the items in the specified dataset.
`XYZColorSource`
`getColorSource()`
Returns the object that provides the color instances for items drawn by the renderer.
`ComposeType`
`getComposeType()`
Returns the type of composition performed by this renderer.
`XYZItemLabelGenerator`
`getItemLabelGenerator()`
Returns the item label generator for the renderer.
`XYZPlot`
`getPlot()`
Returns the plot that the renderer is assigned to, if any.
`void`
`setColors(Color... colors)`
Sets a new color source for the renderer using the specified colors and sends a `Renderer3DChangeEvent` to all registered listeners.
`void`
`setColorSource(XYZColorSource colorSource)`
Sets the color source and sends a `Renderer3DChangeEvent` to all registered listeners.
`void`
`setItemLabelGenerator(XYZItemLabelGenerator generator)`
Sets the item label generator and sends a change event to all registered listeners.
`void`
`setPlot(XYZPlot plot)`
Sets the plot that the renderer is assigned to.

### Methods inherited from class org.jfree.chart3d.renderer.AbstractRenderer3D

`addChangeListener, fireChangeEvent, getItemLabelBackgroundColor, getItemLabelColor, getItemLabelFont, getItemLabelPositioning, isNotify, notifyListeners, receive, removeChangeListener, setItemLabelBackgroundColor, setItemLabelColor, setItemLabelFont, setItemLabelPositioning, setNotify`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### AbstractXYZRenderer

protected AbstractXYZRenderer()
Creates a new default instance.

## Method Details

### getPlot

public XYZPlot getPlot()
Returns the plot that the renderer is assigned to, if any.

Returns:
  The plot (possibly `null`).

### setPlot

public void setPlot(XYZPlot plot)
Sets the plot that the renderer is assigned to.

Parameters:
  `plot` - the plot (`null` permitted).

### getItemLabelGenerator

public XYZItemLabelGenerator getItemLabelGenerator()
Returns the item label generator for the renderer. The default value is `null`. Not all subclasses will use this generator (for example, the `SurfaceRenderer` does not display item labels).

Returns:
  The item label generator (possibly `null`).
Since:
  1.3

### setItemLabelGenerator

public void setItemLabelGenerator(XYZItemLabelGenerator generator)
Sets the item label generator and sends a change event to all registered listeners. You can set this to `null` in which case no item labels will be generated.

Parameters:
  `generator` - the new generator (`null` permitted).
Since:
  1.3

### getComposeType

public ComposeType getComposeType()
Returns the type of composition performed by this renderer. The default is `PER_ITEM` which means the plot will ask the renderer to compose one data item at a time into the 3D model. Some renderers will override this method to return `ALL`, which means the renderer will compose all of the data items in one go (the plot calls the `composeAll(XYZPlot, World, Dimension3D, double, double, double)` method to trigger this).

Returns:
  The compose type (never `null`).
Since:
  1.1

### composeAll

public void composeAll(XYZPlot plot, World world, Dimension3D dimensions, double xOffset, double yOffset, double zOffset)
Adds objects to the `world` to represent all the data items that this renderer is responsible for. This method is only called for renderers that return `ComposeType.ALL` from the `getComposeType()` method.

Parameters:
  `plot` - the plot (not `null`).
  `world` - the 3D model (not `null`).
  `dimensions` - the dimensions of the plot (not `null`).
  `xOffset` - the x-offset.
  `yOffset` - the y-offset.
  `zOffset` - the z-offset.

### getColorSource

public XYZColorSource getColorSource()
Returns the object that provides the color instances for items drawn by the renderer.

Returns:
  The color source (never `null`).

### setColorSource

public void setColorSource(XYZColorSource colorSource)
Sets the color source and sends a `Renderer3DChangeEvent` to all registered listeners.

Parameters:
  `colorSource` - the color source (`null` not permitted).

### setColors

public void setColors(Color... colors)
Sets a new color source for the renderer using the specified colors and sends a `Renderer3DChangeEvent` to all registered listeners. This is a convenience method that is equivalent to `setColorSource(new StandardXYZColorSource(colors))`.

Parameters:
  `colors` - one or more colors (`null` not permitted).
Since:
  1.1

### findXRange

public Range findXRange(XYZDataset dataset)
Returns the range that is required on the x-axis for this renderer to display all the items in the specified dataset.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The x-range.

### findYRange

public Range findYRange(XYZDataset dataset)
Returns the range that is required on the y-axis for this renderer to display all the items in the specified dataset.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The y-range.

### findZRange

public Range findZRange(XYZDataset dataset)
Returns the range that is required on the z-axis for this renderer to display all the items in the specified dataset.

Parameters:
  `dataset` - the dataset (`null` not permitted).
Returns:
  The z-range.

### equals

public boolean equals(Object obj)
Tests this renderer for equality with an arbitrary object.

Overrides:
  `equals` in class `AbstractRenderer3D`
Parameters:
  `obj` - the object (`null` permitted).
Returns:
  A boolean.