com.orsoncharts.renderer

## Class AbstractRenderer3D

- java.lang.Object
- - com.orsoncharts.renderer.AbstractRenderer3D

- All Implemented Interfaces:
    ChartElement, Renderer3D, java.io.Serializable
  Direct Known Subclasses:
    AbstractCategoryRenderer3D, AbstractXYZRenderer

      public abstract class AbstractRenderer3D
      extends java.lang.Object
      implements Renderer3D, java.io.Serializable

  A base class for 3D renderers.
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from interface com.orsoncharts.renderer.Renderer3D

      `TRANSPARENT_COLOR`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addChangeListener(Renderer3DChangeListener listener)` Registers an object for notification of changes to the renderer.
    `boolean` | `equals(java.lang.Object obj)` Tests this renderer for equality with an arbitrary object.
    `protected void` | `fireChangeEvent(boolean requiresWorldUpdate)` Sends a `Renderer3DChangeEvent` to all registered listeners.
    `java.awt.Color` | `getItemLabelBackgroundColor()` Returns the background color for item labels.
    `java.awt.Color` | `getItemLabelColor()` Returns the foreground color used to display item labels.
    `java.awt.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(java.awt.Color color)` Sets the background color and sends a change event to all registered listeners.
    `void` | `setItemLabelColor(java.awt.Color itemLabelColor)` Sets the foreground color used to display item labels and sends a change event to all registered listeners.
    `void` | `setItemLabelFont(java.awt.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 Detail

    - #### AbstractRenderer3D

          protected AbstractRenderer3D()

      Default constructor.

  - ### Method Detail

    - #### getItemLabelFont

          public java.awt.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(java.awt.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 java.awt.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(java.awt.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 java.awt.Color getItemLabelBackgroundColor()

      Returns the background color for item labels.
      Returns:
        The background color (never `null`).
      Since:
        1.3

    - #### setItemLabelBackgroundColor

          public void setItemLabelBackgroundColor(java.awt.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(java.lang.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 `java.lang.Object`
      Parameters:
        `obj` - the object (`null` permitted).
      Returns:
        A boolean.