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

# Class AbstractRenderer3D

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

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

Direct Known Subclasses:
  `AbstractCategoryRenderer3D`, `AbstractXYZRenderer`

public abstract class AbstractRenderer3D extends Object implements Renderer3D, Serializable
A base class for 3D renderers.

See Also:
  - Serialized Form

## Field Summary

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

`TRANSPARENT_COLOR`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`AbstractRenderer3D()`
Default constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`addChangeListener(Renderer3DChangeListener listener)`
Registers an object for notification of changes to the renderer.
`boolean`
`equals(Object obj)`
Tests this renderer for equality with an arbitrary object.
`protected void`
`fireChangeEvent(boolean requiresWorldUpdate)`
Sends a `Renderer3DChangeEvent` to all registered listeners.
`Color`
`getItemLabelBackgroundColor()`
Returns the background color for item labels.
`Color`
`getItemLabelColor()`
Returns the foreground color used to display item labels.
`Font`
`getItemLabelFont()`
Returns the font used to display item labels, if there are any.
`ItemLabelPositioning`
`getItemLabelPositioning()`
Returns the item label positioning.
`boolean`
`isNotify()`
Returns a flag that controls whether or not change events are sent to registered listeners.
`void`
`notifyListeners(Renderer3DChangeEvent event)`
Notifies all registered listeners that the plot has been modified.
`void`
`receive(ChartElementVisitor visitor)`
Receives a `ChartElementVisitor`.
`void`
`removeChangeListener(Renderer3DChangeListener listener)`
Unregisters an object for notification of changes to the renderer.
`void`
`setItemLabelBackgroundColor(Color color)`
Sets the background color and sends a change event to all registered listeners.
`void`
`setItemLabelColor(Color itemLabelColor)`
Sets the foreground color used to display item labels and sends a change event to all registered listeners.
`void`
`setItemLabelFont(Font itemLabelFont)`
Sets the font used to display item labels and sends a change event to all registered listeners.
`void`
`setItemLabelPositioning(ItemLabelPositioning positioning)`
Sets the item label positioning and sends a change event to all registered listeners.
`void`
`setNotify(boolean notify)`
Sets a flag that controls whether or not listeners receive `Renderer3DChangeEvent` notifications.

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

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

## Constructor Details

### AbstractRenderer3D

protected AbstractRenderer3D()
Default constructor.

## Method Details

### getItemLabelFont

public Font getItemLabelFont()
Returns the font used to display item labels, if there are any. The default value is `Font(Font.SERIF, Font.PLAIN, 8)`.

Returns:
  The font (never `null`).
Since:
  1.3

### setItemLabelFont

public void setItemLabelFont(Font itemLabelFont)
Sets the font used to display item labels and sends a change event to all registered listeners.

Parameters:
  `itemLabelFont` - the font (`null` not permitted).
Since:
  1.3

### getItemLabelColor

public Color getItemLabelColor()
Returns the foreground color used to display item labels. The default value is `Color.BLACK`.

Returns:
  The foreground color (never `null`).
Since:
  1.3

### setItemLabelColor

public void setItemLabelColor(Color itemLabelColor)
Sets the foreground color used to display item labels and sends a change event to all registered listeners.

Parameters:
  `itemLabelColor` - the new color (`null` not permitted).
Since:
  1.3

### getItemLabelBackgroundColor

public Color getItemLabelBackgroundColor()
Returns the background color for item labels.

Returns:
  The background color (never `null`).
Since:
  1.3

### setItemLabelBackgroundColor

public void setItemLabelBackgroundColor(Color color)
Sets the background color and sends a change event to all registered listeners.

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

### getItemLabelPositioning

public ItemLabelPositioning getItemLabelPositioning()
Returns the item label positioning. The default value is `ItemLabelPositioning.CENTRAL`.

Returns:
  The item label positioning (never `null`).
Since:
  1.3

### setItemLabelPositioning

public void setItemLabelPositioning(ItemLabelPositioning positioning)
Sets the item label positioning and sends a change event to all registered listeners.

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

### isNotify

public boolean isNotify()
Returns a flag that controls whether or not change events are sent to registered listeners.

Returns:
  A boolean.
See Also:
  - `setNotify(boolean)`

### setNotify

public void setNotify(boolean notify)
Sets a flag that controls whether or not listeners receive `Renderer3DChangeEvent` notifications.

Parameters:
  `notify` - a boolean.
See Also:
  - `isNotify()`

### receive

public void receive(ChartElementVisitor visitor)
Receives a `ChartElementVisitor`. This is part of a general purpose mechanism for traversing the chart structure and performing operations on the elements in the structure. You won't normally call this method directly.

Specified by:
  `receive` in interface `ChartElement`
Parameters:
  `visitor` - the visitor (`null` not permitted).
Since:
  1.2

### addChangeListener

public void addChangeListener(Renderer3DChangeListener listener)
Registers an object for notification of changes to the renderer.

Specified by:
  `addChangeListener` in interface `Renderer3D`
Parameters:
  `listener` - the object to be registered.
See Also:
  - `removeChangeListener(Renderer3DChangeListener)`

### removeChangeListener

public void removeChangeListener(Renderer3DChangeListener listener)
Unregisters an object for notification of changes to the renderer.

Specified by:
  `removeChangeListener` in interface `Renderer3D`
Parameters:
  `listener` - the object to be unregistered.
See Also:
  - `addChangeListener(Renderer3DChangeListener)`

### notifyListeners

public void notifyListeners(Renderer3DChangeEvent event)
Notifies all registered listeners that the plot has been modified.

Parameters:
  `event` - information about the change event.

### fireChangeEvent

protected void fireChangeEvent(boolean requiresWorldUpdate)
Sends a `Renderer3DChangeEvent` to all registered listeners.

Parameters:
  `requiresWorldUpdate` - a flag indicating whether or not the change requires the 3D world to be updated.

### equals

public boolean equals(Object obj)
Tests this renderer for equality with an arbitrary object. The change listeners are NOT considered in the test, but the `notify` flag is taken into account.

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