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

An abstract base class that can be used to create new XYZRenderer subclasses.
See Also:
  • Constructor Details

  • 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

      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

      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

      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

      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.