java.lang.Object
org.jfree.chart3d.plot.AbstractPlot3D
org.jfree.chart3d.plot.XYZPlot
- All Implemented Interfaces:
Serializable
,EventListener
,Axis3DChangeListener
,ChartElement
,Dataset3DChangeListener
,Plot3D
,Renderer3DChangeListener
public class XYZPlot
extends AbstractPlot3D
implements Dataset3DChangeListener, Axis3DChangeListener, Renderer3DChangeListener, Serializable
A 3D plot with three numerical axes that displays data from an
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
XYZDataset
.
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
- See Also:
-
Field Summary
Fields inherited from class org.jfree.chart3d.plot.AbstractPlot3D
autoAdjustDimensions, dimensions
-
Constructor Summary
ConstructorsConstructorDescriptionXYZPlot
(XYZDataset dataset, XYZRenderer renderer, ValueAxis3D xAxis, ValueAxis3D yAxis, ValueAxis3D zAxis) Creates a new plot with the specified axes. -
Method Summary
Modifier and TypeMethodDescriptionvoid
axisChanged
(Axis3DChangeEvent event) Receives notification that one of the plot's axes has changed, and responds by passing on aPlot3DChangeEvent
to the plot's registered listeners (with the default set-up, this notifies the chart).void
Adds 3D objects representing the current data for the plot to the specified world.void
Receives notification that the plot's dataset has changed, and responds by passing on aPlot3DChangeEvent
to the plot's registered listeners (with the default set-up, this notifies the chart).boolean
Tests this plot instance for equality with an arbitrary object.generateToolTipText
(ItemKey itemKey) Returns the tool tip text for the specified data item, ornull
if no tool tip is required.Returns the dataset for the plot.Returns the paint used to draw the gridlines for the x-axis.Returns the paint used to draw the gridlines for the y-axis.Returns the paint used to draw the gridlines for the z-axis.Returns the stroke used to draw the gridlines for the x-axis.Returns the stroke used to draw the gridlines for the y-axis.Returns the stroke used to draw the gridlines for the z-axis.Returns a list containing legend item info, typically one item for each series in the chart.Returns the legend label generator.Returns the renderer for the plot.getXAxis()
Returns the x-axis.getYAxis()
Returns the y-axis.getZAxis()
Returns the z-axis.boolean
Returns the flag that controls whether or not gridlines are shown for the x-axis.boolean
Returns the flag that controls whether or not gridlines are shown for the y-axis.boolean
Returns the flag that controls whether or not gridlines are shown for the z-axis.void
receive
(ChartElementVisitor visitor) Receives a visitor.void
Receives notification that the plot's renderer has changed, and responds by passing on aPlot3DChangeEvent
to the plot's registered listeners (with the default set-up, this notifies the chart).void
setDataset
(XYZDataset dataset) Sets the dataset and sends a change event notification to all registered listeners.void
setDimensions
(Dimension3D dim) Sets the dimensions for the plot and notifies registered listeners that the plot dimensions have been changed.void
setGridlinePaintX
(Paint paint) Sets the paint used to draw the gridlines for the x-axis, and sends aPlot3DChangeEvent
to all registered listeners.void
setGridlinePaintY
(Paint paint) Sets the paint used to draw the gridlines for the y-axis, and sends aPlot3DChangeEvent
to all registered listeners.void
setGridlinePaintZ
(Paint paint) Sets the paint used to draw the gridlines for the z-axis, and sends aPlot3DChangeEvent
to all registered listeners.void
setGridlineStrokeX
(Stroke stroke) Sets the stroke used to draw the gridlines for the x-axis, and sends aPlot3DChangeEvent
to all registered listeners.void
setGridlineStrokeY
(Stroke stroke) Sets the stroke used to draw the gridlines for the y-axis, and sends aPlot3DChangeEvent
to all registered listeners.void
setGridlineStrokeZ
(Stroke stroke) Sets the stroke used to draw the gridlines for the z-axis, and sends aPlot3DChangeEvent
to all registered listeners.void
setGridlinesVisibleX
(boolean visible) Sets the flag that controls whether or not gridlines are shown for the x-axis and sends aPlot3DChangeEvent
to all registered listeners.void
setGridlinesVisibleY
(boolean visible) Sets the flag that controls whether or not gridlines are shown for the y-axis and sends aPlot3DChangeEvent
to all registered listeners.void
setGridlinesVisibleZ
(boolean visible) Sets the flag that controls whether or not gridlines are shown for the z-axis and sends aPlot3DChangeEvent
to all registered listeners.void
setLegendLabelGenerator
(XYZLabelGenerator generator) Sets the legend label generator and sends aPlot3DChangeEvent
to all registered listeners.void
setRenderer
(XYZRenderer renderer) Sets the renderer for the plot and sends aPlot3DChangeEvent
to all registered listeners.void
setXAxis
(ValueAxis3D xAxis) Sets the x-axis and sends aPlot3DChangeEvent
to all registered listeners.void
setYAxis
(ValueAxis3D yAxis) Sets the y-axis and sends aPlot3DChangeEvent
to all registered listeners.void
setZAxis
(ValueAxis3D zAxis) Sets the z-axis and sends aPlot3DChangeEvent
to all registered listeners.Methods inherited from class org.jfree.chart3d.plot.AbstractPlot3D
addChangeListener, fireChangeEvent, getChart, getDimensions, isAutoAdjustDimensions, isNotify, notifyListeners, removeChangeListener, setChart, setNotify
-
Constructor Details
-
XYZPlot
public XYZPlot(XYZDataset dataset, XYZRenderer renderer, ValueAxis3D xAxis, ValueAxis3D yAxis, ValueAxis3D zAxis) Creates a new plot with the specified axes.- Parameters:
dataset
- the dataset (null
not permitted).renderer
- the renderer (null
not permitted).xAxis
- the x-axis (null
not permitted).yAxis
- the y-axis (null
not permitted).zAxis
- the z-axis (null
not permitted).
-
-
Method Details
-
setDimensions
Sets the dimensions for the plot and notifies registered listeners that the plot dimensions have been changed.- Parameters:
dim
- the new dimensions (null
not permitted).
-
getDataset
Returns the dataset for the plot.- Returns:
- The dataset (never
null
).
-
setDataset
Sets the dataset and sends a change event notification to all registered listeners.- Parameters:
dataset
- the new dataset (null
not permitted).
-
getXAxis
Returns the x-axis.- Returns:
- The x-axis (never
null
).
-
setXAxis
Sets the x-axis and sends aPlot3DChangeEvent
to all registered listeners.- Parameters:
xAxis
- the x-axis (null
not permitted).
-
getYAxis
Returns the y-axis.- Returns:
- The y-axis (never
null
).
-
setYAxis
Sets the y-axis and sends aPlot3DChangeEvent
to all registered listeners.- Parameters:
yAxis
- the y-axis (null
not permitted).
-
getZAxis
Returns the z-axis.- Returns:
- The z-axis (never
null
).
-
setZAxis
Sets the z-axis and sends aPlot3DChangeEvent
to all registered listeners.- Parameters:
zAxis
- the z-axis (null
not permitted).
-
getRenderer
Returns the renderer for the plot.- Returns:
- The renderer (possibly
null
).
-
setRenderer
Sets the renderer for the plot and sends aPlot3DChangeEvent
to all registered listeners.- Parameters:
renderer
- the renderer (null
not permitted).
-
isGridlinesVisibleX
Returns the flag that controls whether or not gridlines are shown for the x-axis.- Returns:
- A boolean.
-
setGridlinesVisibleX
Sets the flag that controls whether or not gridlines are shown for the x-axis and sends aPlot3DChangeEvent
to all registered listeners.- Parameters:
visible
- the new flag value.
-
getGridlinePaintX
Returns the paint used to draw the gridlines for the x-axis.- Returns:
- The paint (
null
not permitted).
-
setGridlinePaintX
Sets the paint used to draw the gridlines for the x-axis, and sends aPlot3DChangeEvent
to all registered listeners.- Parameters:
paint
- the paint (null
not permitted).
-
getGridlineStrokeX
Returns the stroke used to draw the gridlines for the x-axis.- Returns:
- The stroke (
null
not permitted).
-
setGridlineStrokeX
Sets the stroke used to draw the gridlines for the x-axis, and sends aPlot3DChangeEvent
to all registered listeners.- Parameters:
stroke
- the stroke (null
not permitted).
-
isGridlinesVisibleY
Returns the flag that controls whether or not gridlines are shown for the y-axis.- Returns:
- A boolean.
-
setGridlinesVisibleY
Sets the flag that controls whether or not gridlines are shown for the y-axis and sends aPlot3DChangeEvent
to all registered listeners.- Parameters:
visible
- the new flag value.
-
getGridlinePaintY
Returns the paint used to draw the gridlines for the y-axis.- Returns:
- The paint (
null
not permitted).
-
setGridlinePaintY
Sets the paint used to draw the gridlines for the y-axis, and sends aPlot3DChangeEvent
to all registered listeners.- Parameters:
paint
- the paint (null
not permitted).
-
getGridlineStrokeY
Returns the stroke used to draw the gridlines for the y-axis.- Returns:
- The stroke (
null
not permitted).
-
setGridlineStrokeY
Sets the stroke used to draw the gridlines for the y-axis, and sends aPlot3DChangeEvent
to all registered listeners.- Parameters:
stroke
- the stroke (null
not permitted).
-
isGridlinesVisibleZ
Returns the flag that controls whether or not gridlines are shown for the z-axis.- Returns:
- A boolean.
-
setGridlinesVisibleZ
Sets the flag that controls whether or not gridlines are shown for the z-axis and sends aPlot3DChangeEvent
to all registered listeners.- Parameters:
visible
- the new flag value.
-
getGridlinePaintZ
Returns the paint used to draw the gridlines for the z-axis.- Returns:
- The paint (
null
not permitted).
-
setGridlinePaintZ
Sets the paint used to draw the gridlines for the z-axis, and sends aPlot3DChangeEvent
to all registered listeners.- Parameters:
paint
- the paint (null
not permitted).
-
getGridlineStrokeZ
Returns the stroke used to draw the gridlines for the z-axis.- Returns:
- The stroke (
null
not permitted).
-
setGridlineStrokeZ
Sets the stroke used to draw the gridlines for the z-axis, and sends aPlot3DChangeEvent
to all registered listeners.- Parameters:
stroke
- the stroke (null
not permitted).
-
getLegendLabelGenerator
Returns the legend label generator. The default value is a default instance ofStandardXYZLabelGenerator
.- Returns:
- The legend label generator (never
null
). - Since:
- 1.2
-
setLegendLabelGenerator
Sets the legend label generator and sends aPlot3DChangeEvent
to all registered listeners.- Parameters:
generator
- the generator (null
not permitted).- Since:
- 1.2
-
getLegendInfo
Returns a list containing legend item info, typically one item for each series in the chart. This is intended for use in the construction of a chart legend.- Specified by:
getLegendInfo
in interfacePlot3D
- Returns:
- A list containing legend item info.
-
compose
Adds 3D objects representing the current data for the plot to the specified world. After the world has been populated (or constructed) in this way, it is ready for rendering. -
generateToolTipText
Description copied from class:AbstractPlot3D
Returns the tool tip text for the specified data item, ornull
if no tool tip is required.- Specified by:
generateToolTipText
in interfacePlot3D
- Specified by:
generateToolTipText
in classAbstractPlot3D
- Parameters:
itemKey
- the item key (null
not permitted).- Returns:
- The tool tip text (possibly
null
).
-
receive
Receives a visitor. This is a general purpose mechanism, but the main use is to apply chart style changes across all the elements of a chart.- Specified by:
receive
in interfaceChartElement
- Specified by:
receive
in classAbstractPlot3D
- Parameters:
visitor
- the visitor (null
not permitted).- Since:
- 1.2
-
equals
Tests this plot instance for equality with an arbitrary object.- Overrides:
equals
in classAbstractPlot3D
- Parameters:
obj
- the object (null
permitted).- Returns:
- A boolean.
-
axisChanged
Receives notification that one of the plot's axes has changed, and responds by passing on aPlot3DChangeEvent
to the plot's registered listeners (with the default set-up, this notifies the chart).- Specified by:
axisChanged
in interfaceAxis3DChangeListener
- Parameters:
event
- the event.
-
rendererChanged
Receives notification that the plot's renderer has changed, and responds by passing on aPlot3DChangeEvent
to the plot's registered listeners (with the default set-up, this notifies the chart).- Specified by:
rendererChanged
in interfaceRenderer3DChangeListener
- Parameters:
event
- the event.
-
datasetChanged
Receives notification that the plot's dataset has changed, and responds by passing on aPlot3DChangeEvent
to the plot's registered listeners (with the default set-up, this notifies the chart).- Specified by:
datasetChanged
in interfaceDataset3DChangeListener
- Overrides:
datasetChanged
in classAbstractPlot3D
- Parameters:
event
- the event.
-