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 TypeMethodDescriptionvoidcomposeAll(XYZPlot plot, World world, Dimension3D dimensions, double xOffset, double yOffset, double zOffset) Adds objects to theworldto represent all the data items that this renderer is responsible for.booleanTests 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.voidSets a new color source for the renderer using the specified colors and sends aRenderer3DChangeEventto all registered listeners.voidsetColorSource(XYZColorSource colorSource) Sets the color source and sends aRenderer3DChangeEventto all registered listeners.voidsetItemLabelGenerator(XYZItemLabelGenerator generator) Sets the item label generator and sends a change event to all registered listeners.voidSets 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 (nullpermitted).
-
getItemLabelGenerator
Returns the item label generator for the renderer. The default value isnull. Not all subclasses will use this generator (for example, theSurfaceRendererdoes 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 tonullin which case no item labels will be generated.- Parameters:
generator- the new generator (nullpermitted).- Since:
- 1.3
-
getComposeType
Returns the type of composition performed by this renderer. The default isPER_ITEMwhich 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 theworldto represent all the data items that this renderer is responsible for. This method is only called for renderers that returnComposeType.ALLfrom 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 aRenderer3DChangeEventto all registered listeners.- Parameters:
colorSource- the color source (nullnot permitted).
-
setColors
Sets a new color source for the renderer using the specified colors and sends aRenderer3DChangeEventto all registered listeners. This is a convenience method that is equivalent tosetColorSource(new StandardXYZColorSource(colors)).- Parameters:
colors- one or more colors (nullnot 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 (nullnot 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 (nullnot 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 (nullnot permitted).- Returns:
- The z-range.
-
equals
Tests this renderer for equality with an arbitrary object.- Overrides:
equalsin classAbstractRenderer3D- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-