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:
-
Field Summary
Fields inherited from interface org.jfree.chart3d.renderer.Renderer3D
TRANSPARENT_COLOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
composeAll
(XYZPlot plot, World world, Dimension3D dimensions, double xOffset, double yOffset, double zOffset) Adds objects to theworld
to represent all the data items that this renderer is responsible for.boolean
Tests this renderer for equality with an arbitrary object.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.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.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.Returns the object that provides the color instances for items drawn by the renderer.Returns the type of composition performed by this renderer.Returns the item label generator for the renderer.getPlot()
Returns the plot that the renderer is assigned to, if any.void
Sets a new color source for the renderer using the specified colors and sends aRenderer3DChangeEvent
to all registered listeners.void
setColorSource
(XYZColorSource colorSource) Sets the color source and sends aRenderer3DChangeEvent
to all registered listeners.void
setItemLabelGenerator
(XYZItemLabelGenerator generator) Sets the item label generator and sends a change event to all registered listeners.void
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
-
Constructor Details
-
AbstractXYZRenderer
protected AbstractXYZRenderer()Creates a new default instance.
-
-
Method Details
-
getPlot
Returns the plot that the renderer is assigned to, if any.- Returns:
- The plot (possibly
null
).
-
setPlot
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 isnull
. Not all subclasses will use this generator (for example, theSurfaceRenderer
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 tonull
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 isPER_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 returnALL
, which means the renderer will compose all of the data items in one go (the plot calls thecomposeAll(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 theworld
to represent all the data items that this renderer is responsible for. This method is only called for renderers that returnComposeType.ALL
from thegetComposeType()
method.- Parameters:
plot
- the plot (notnull
).world
- the 3D model (notnull
).dimensions
- the dimensions of the plot (notnull
).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
Sets the color source and sends aRenderer3DChangeEvent
to all registered listeners.- Parameters:
colorSource
- the color source (null
not permitted).
-
setColors
Sets a new color source for the renderer using the specified colors and sends aRenderer3DChangeEvent
to all registered listeners. This is a convenience method that is equivalent tosetColorSource(new StandardXYZColorSource(colors))
.- Parameters:
colors
- one or more colors (null
not permitted).- Since:
- 1.1
-
findXRange
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
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
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
Tests this renderer for equality with an arbitrary object.- Overrides:
equals
in classAbstractRenderer3D
- Parameters:
obj
- the object (null
permitted).- Returns:
- A boolean.
-