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 TypeMethodDescriptionvoidaxisChanged(Axis3DChangeEvent event) Receives notification that one of the plot's axes has changed, and responds by passing on aPlot3DChangeEventto the plot's registered listeners (with the default set-up, this notifies the chart).voidAdds 3D objects representing the current data for the plot to the specified world.voidReceives notification that the plot's dataset has changed, and responds by passing on aPlot3DChangeEventto the plot's registered listeners (with the default set-up, this notifies the chart).booleanTests this plot instance for equality with an arbitrary object.generateToolTipText(ItemKey itemKey) Returns the tool tip text for the specified data item, ornullif 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.booleanReturns the flag that controls whether or not gridlines are shown for the x-axis.booleanReturns the flag that controls whether or not gridlines are shown for the y-axis.booleanReturns the flag that controls whether or not gridlines are shown for the z-axis.voidreceive(ChartElementVisitor visitor) Receives a visitor.voidReceives notification that the plot's renderer has changed, and responds by passing on aPlot3DChangeEventto the plot's registered listeners (with the default set-up, this notifies the chart).voidsetDataset(XYZDataset dataset) Sets the dataset and sends a change event notification to all registered listeners.voidsetDimensions(Dimension3D dim) Sets the dimensions for the plot and notifies registered listeners that the plot dimensions have been changed.voidsetGridlinePaintX(Paint paint) Sets the paint used to draw the gridlines for the x-axis, and sends aPlot3DChangeEventto all registered listeners.voidsetGridlinePaintY(Paint paint) Sets the paint used to draw the gridlines for the y-axis, and sends aPlot3DChangeEventto all registered listeners.voidsetGridlinePaintZ(Paint paint) Sets the paint used to draw the gridlines for the z-axis, and sends aPlot3DChangeEventto all registered listeners.voidsetGridlineStrokeX(Stroke stroke) Sets the stroke used to draw the gridlines for the x-axis, and sends aPlot3DChangeEventto all registered listeners.voidsetGridlineStrokeY(Stroke stroke) Sets the stroke used to draw the gridlines for the y-axis, and sends aPlot3DChangeEventto all registered listeners.voidsetGridlineStrokeZ(Stroke stroke) Sets the stroke used to draw the gridlines for the z-axis, and sends aPlot3DChangeEventto all registered listeners.voidsetGridlinesVisibleX(boolean visible) Sets the flag that controls whether or not gridlines are shown for the x-axis and sends aPlot3DChangeEventto all registered listeners.voidsetGridlinesVisibleY(boolean visible) Sets the flag that controls whether or not gridlines are shown for the y-axis and sends aPlot3DChangeEventto all registered listeners.voidsetGridlinesVisibleZ(boolean visible) Sets the flag that controls whether or not gridlines are shown for the z-axis and sends aPlot3DChangeEventto all registered listeners.voidsetLegendLabelGenerator(XYZLabelGenerator generator) Sets the legend label generator and sends aPlot3DChangeEventto all registered listeners.voidsetRenderer(XYZRenderer renderer) Sets the renderer for the plot and sends aPlot3DChangeEventto all registered listeners.voidsetXAxis(ValueAxis3D xAxis) Sets the x-axis and sends aPlot3DChangeEventto all registered listeners.voidsetYAxis(ValueAxis3D yAxis) Sets the y-axis and sends aPlot3DChangeEventto all registered listeners.voidsetZAxis(ValueAxis3D zAxis) Sets the z-axis and sends aPlot3DChangeEventto 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 (nullnot permitted).renderer- the renderer (nullnot permitted).xAxis- the x-axis (nullnot permitted).yAxis- the y-axis (nullnot permitted).zAxis- the z-axis (nullnot 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 (nullnot 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 (nullnot permitted).
-
getXAxis
Returns the x-axis.- Returns:
- The x-axis (never
null).
-
setXAxis
Sets the x-axis and sends aPlot3DChangeEventto all registered listeners.- Parameters:
xAxis- the x-axis (nullnot permitted).
-
getYAxis
Returns the y-axis.- Returns:
- The y-axis (never
null).
-
setYAxis
Sets the y-axis and sends aPlot3DChangeEventto all registered listeners.- Parameters:
yAxis- the y-axis (nullnot permitted).
-
getZAxis
Returns the z-axis.- Returns:
- The z-axis (never
null).
-
setZAxis
Sets the z-axis and sends aPlot3DChangeEventto all registered listeners.- Parameters:
zAxis- the z-axis (nullnot permitted).
-
getRenderer
Returns the renderer for the plot.- Returns:
- The renderer (possibly
null).
-
setRenderer
Sets the renderer for the plot and sends aPlot3DChangeEventto all registered listeners.- Parameters:
renderer- the renderer (nullnot 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 aPlot3DChangeEventto 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 (
nullnot permitted).
-
setGridlinePaintX
Sets the paint used to draw the gridlines for the x-axis, and sends aPlot3DChangeEventto all registered listeners.- Parameters:
paint- the paint (nullnot permitted).
-
getGridlineStrokeX
Returns the stroke used to draw the gridlines for the x-axis.- Returns:
- The stroke (
nullnot permitted).
-
setGridlineStrokeX
Sets the stroke used to draw the gridlines for the x-axis, and sends aPlot3DChangeEventto all registered listeners.- Parameters:
stroke- the stroke (nullnot 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 aPlot3DChangeEventto 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 (
nullnot permitted).
-
setGridlinePaintY
Sets the paint used to draw the gridlines for the y-axis, and sends aPlot3DChangeEventto all registered listeners.- Parameters:
paint- the paint (nullnot permitted).
-
getGridlineStrokeY
Returns the stroke used to draw the gridlines for the y-axis.- Returns:
- The stroke (
nullnot permitted).
-
setGridlineStrokeY
Sets the stroke used to draw the gridlines for the y-axis, and sends aPlot3DChangeEventto all registered listeners.- Parameters:
stroke- the stroke (nullnot 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 aPlot3DChangeEventto 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 (
nullnot permitted).
-
setGridlinePaintZ
Sets the paint used to draw the gridlines for the z-axis, and sends aPlot3DChangeEventto all registered listeners.- Parameters:
paint- the paint (nullnot permitted).
-
getGridlineStrokeZ
Returns the stroke used to draw the gridlines for the z-axis.- Returns:
- The stroke (
nullnot permitted).
-
setGridlineStrokeZ
Sets the stroke used to draw the gridlines for the z-axis, and sends aPlot3DChangeEventto all registered listeners.- Parameters:
stroke- the stroke (nullnot 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 aPlot3DChangeEventto all registered listeners.- Parameters:
generator- the generator (nullnot 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:
getLegendInfoin 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:AbstractPlot3DReturns the tool tip text for the specified data item, ornullif no tool tip is required.- Specified by:
generateToolTipTextin interfacePlot3D- Specified by:
generateToolTipTextin classAbstractPlot3D- Parameters:
itemKey- the item key (nullnot 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:
receivein interfaceChartElement- Specified by:
receivein classAbstractPlot3D- Parameters:
visitor- the visitor (nullnot permitted).- Since:
- 1.2
-
equals
Tests this plot instance for equality with an arbitrary object.- Overrides:
equalsin classAbstractPlot3D- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-
axisChanged
Receives notification that one of the plot's axes has changed, and responds by passing on aPlot3DChangeEventto the plot's registered listeners (with the default set-up, this notifies the chart).- Specified by:
axisChangedin interfaceAxis3DChangeListener- Parameters:
event- the event.
-
rendererChanged
Receives notification that the plot's renderer has changed, and responds by passing on aPlot3DChangeEventto the plot's registered listeners (with the default set-up, this notifies the chart).- Specified by:
rendererChangedin interfaceRenderer3DChangeListener- Parameters:
event- the event.
-
datasetChanged
Receives notification that the plot's dataset has changed, and responds by passing on aPlot3DChangeEventto the plot's registered listeners (with the default set-up, this notifies the chart).- Specified by:
datasetChangedin interfaceDataset3DChangeListener- Overrides:
datasetChangedin classAbstractPlot3D- Parameters:
event- the event.
-