public class CategoryPlot3D extends AbstractPlot3D implements Axis3DChangeListener, Renderer3DChangeListener, java.io.Serializable
CategoryDataset3D.
Plot3DChangeEvent to the
Chart3D instance that owns the plot. This event chain is the
mechanism that ensures that charts are repainted whenever the dataset
changes, or when changes are made to the configuration of any chart
component.
autoAdjustDimensions, dimensions| Constructor and Description |
|---|
CategoryPlot3D(CategoryDataset3D dataset,
CategoryRenderer3D renderer,
CategoryAxis3D rowAxis,
CategoryAxis3D columnAxis,
ValueAxis3D valueAxis)
Creates a new plot with the supplied dataset, renderer and axes.
|
| Modifier and Type | Method and Description |
|---|---|
void |
axisChanged(Axis3DChangeEvent event)
Receives notification that one of the axes has been changed.
|
void |
compose(World world,
double xOffset,
double yOffset,
double zOffset)
Adds 3D objects representing the current data for the plot to the
specified world.
|
void |
datasetChanged(Dataset3DChangeEvent event)
Receives notification of a change to the dataset and handles this by
adjusting the plot dimensions (according to the setting of the
autoAdjustDimensions flag), reconfiguring the axes, and
propagating a Plot3DChangeEvent. |
boolean |
equals(java.lang.Object obj)
Tests this plot for equality with an arbitrary object.
|
java.lang.String |
generateToolTipText(ItemKey itemKey)
Returns the tool tip text for the specified data item, or
null if no tool tip is required. |
CategoryAxis3D |
getColumnAxis()
Returns the column axis.
|
CategoryDataset3D |
getDataset()
Returns the dataset for the chart.
|
java.awt.Paint |
getGridlinePaintForColumns()
Returns the paint used to draw the grid lines for the column axis, if
they are visible.
|
java.awt.Paint |
getGridlinePaintForRows()
Returns the paint used to draw the gridlines for the row axis, if they
are visible.
|
java.awt.Paint |
getGridlinePaintForValues()
Returns the paint for the gridlines associated with the value axis.
|
java.awt.Stroke |
getGridlineStrokeForColumns()
Returns the stroke for the gridlines associated with the column axis.
|
java.awt.Stroke |
getGridlineStrokeForRows()
Returns the stroke for the gridlines associated with the row axis.
|
java.awt.Stroke |
getGridlineStrokeForValues()
Returns the stroke for the gridlines associated with the value axis.
|
boolean |
getGridlinesVisibleForColumns()
Returns
true if gridlines are shown for the column axis
and false otherwise. |
boolean |
getGridlinesVisibleForRows()
Returns
true if gridlines are shown for the column axis
and false otherwise. |
boolean |
getGridlinesVisibleForValues()
Returns
true if gridlines are shown for the column axis
and false otherwise. |
java.util.List<LegendItemInfo> |
getLegendInfo()
Returns a list containing legend item info, typically one item for
each series in the chart.
|
CategoryLabelGenerator |
getLegendLabelGenerator()
Returns the legend label generator, an object that converts key values
in the dataset into corresponding strings for presentation in the chart.
|
CategoryRenderer3D |
getRenderer()
Returns the renderer (very often you will need to cast this to a
specific class to make customisations).
|
CategoryAxis3D |
getRowAxis()
Returns the row axis.
|
CategoryItemLabelGenerator |
getToolTipGenerator()
Returns the tool tip generator.
|
ValueAxis3D |
getValueAxis()
Returns the value axis (the vertical axis in the plot).
|
java.lang.Double |
getYDimensionOverride()
Returns the y-dimension override.
|
void |
receive(ChartElementVisitor visitor)
Accepts a visitor for the plot.
|
void |
rendererChanged(Renderer3DChangeEvent event)
Receives notification that the renderer has been modified in some way.
|
void |
setAutoAdjustDimensions(boolean auto)
Sets the flag that controls whether the plot's dimensions are
automatically calculated and, if
true, sends a change
event to all registered listeners. |
void |
setColumnAxis(CategoryAxis3D axis)
Sets the column axis and sends a
Plot3DChangeEvent to all
registered listeners. |
void |
setDataset(CategoryDataset3D dataset)
Sets the dataset and sends a
Plot3DChangeEvent to all registered
listeners. |
void |
setDimensions(Dimension3D dimensions)
Sets the dimensions (in 3D space) for the plot, resets the
autoAdjustDimensions flag to false, and sends
a Plot3DChangeEvent to all registered listeners. |
void |
setGridlinePaintForColumns(java.awt.Paint paint)
Sets the paint used to draw the grid lines for the column axis, if
they are visible, and sends a
Plot3DChangeEvent to all
registered listeners. |
void |
setGridlinePaintForRows(java.awt.Paint paint)
Sets the paint used for the row axis gridlines and sends a
Plot3DChangeEvent to all registered listeners. |
void |
setGridlinePaintForValues(java.awt.Paint paint)
Sets the paint used for the value axis gridlines and sends a
Plot3DChangeEvent to all registered listeners. |
void |
setGridlineStrokeForColumns(java.awt.Stroke stroke)
Sets the stroke used to draw the grid lines for the column axis, if
they are visible, and sends a
Plot3DChangeEvent to all
registered listeners. |
void |
setGridlineStrokeForRows(java.awt.Stroke stroke)
Sets the stroke used to draw the gridlines for the row axis, if they
are visible, and sends a
Plot3DChangeEvent to all
registered listeners. |
void |
setGridlineStrokeForValues(java.awt.Stroke stroke)
Sets the stroke used to draw the grid lines for the value axis, if
they are visible, and sends a
Plot3DChangeEvent to all
registered listeners. |
void |
setGridlinesVisibleForColumns(boolean visible)
Sets the flag that controls whether or not gridlines are shown for the
column axis and sends a
Plot3DChangeEvent to all registered
listeners. |
void |
setGridlinesVisibleForRows(boolean visible)
Sets the flag that controls whether or not gridlines are shown for the
row axis and sends a
Plot3DChangeEvent to all registered
listeners. |
void |
setGridlinesVisibleForValues(boolean visible)
Sets the flag that controls whether or not gridlines are shown for the
value axis and sends a
Plot3DChangeEvent to all registered
listeners. |
void |
setLegendLabelGenerator(CategoryLabelGenerator generator)
Sets the legend label generator and sends a
Plot3DChangeEvent
to all registered listeners. |
void |
setRenderer(CategoryRenderer3D renderer)
Sets the renderer and sends a change event to all registered listeners.
|
void |
setRowAxis(CategoryAxis3D axis)
Sets the row axis and sends a
Plot3DChangeEvent to all
registered listeners. |
void |
setToolTipGenerator(CategoryItemLabelGenerator generator)
Sets the tool tip generator and sends a
Plot3DChangeEvent to all
registered listeners. |
void |
setValueAxis(ValueAxis3D axis)
Sets the value axis and sends a
Plot3DChangeEvent to all
registered listeners. |
void |
setYDimensionOverride(java.lang.Double dim)
Sets the y-dimension override and, if the
autoAdjustDimensions
flag is set, recalculates the dimensions and sends a
Plot3DChangeEvent to all registered listeners. |
addChangeListener, fireChangeEvent, getChart, getDimensions, isAutoAdjustDimensions, isNotify, notifyListeners, removeChangeListener, setChart, setNotifypublic CategoryPlot3D(CategoryDataset3D dataset, CategoryRenderer3D renderer, CategoryAxis3D rowAxis, CategoryAxis3D columnAxis, ValueAxis3D valueAxis)
dataset - the dataset (null not permitted).renderer - the renderer (null not permitted).rowAxis - the row axis (null not permitted).columnAxis - the column axis (null not permitted).valueAxis - the value axis (null not permitted).public void setAutoAdjustDimensions(boolean auto)
true, sends a change
event to all registered listeners.auto - the new flag value.public void setDimensions(Dimension3D dimensions)
autoAdjustDimensions flag to false, and sends
a Plot3DChangeEvent to all registered listeners.dimensions - the dimensions (null not permitted).Plot3D.getDimensions()public CategoryDataset3D getDataset()
null).public void setDataset(CategoryDataset3D dataset)
Plot3DChangeEvent to all registered
listeners. When you call this method, the axes will be reconfigured for
the new data.dataset - the dataset (null not permitted).public CategoryRenderer3D getRenderer()
null).public void setRenderer(CategoryRenderer3D renderer)
renderer - the renderer (null not permitted).public CategoryAxis3D getRowAxis()
public void setRowAxis(CategoryAxis3D axis)
Plot3DChangeEvent to all
registered listeners. The row axis is equivalent to the z-axis.axis - the row axis (null not permitted).public CategoryAxis3D getColumnAxis()
null).public void setColumnAxis(CategoryAxis3D axis)
Plot3DChangeEvent to all
registered listeners.axis - the new axis (null not permitted).setRowAxis(com.orsoncharts.axis.CategoryAxis3D),
setValueAxis(com.orsoncharts.axis.ValueAxis3D)public ValueAxis3D getValueAxis()
null).public void setValueAxis(ValueAxis3D axis)
Plot3DChangeEvent to all
registered listeners.axis - the axis (null not permitted).public boolean getGridlinesVisibleForRows()
true if gridlines are shown for the column axis
and false otherwise. The default value is false.public void setGridlinesVisibleForRows(boolean visible)
Plot3DChangeEvent to all registered
listeners.visible - the new flag value.public java.awt.Paint getGridlinePaintForRows()
null).public void setGridlinePaintForRows(java.awt.Paint paint)
Plot3DChangeEvent to all registered listeners.paint - the paint (null not permitted).public java.awt.Stroke getGridlineStrokeForRows()
BasicStroke(0.5f, BasicStroke.CAP_ROUND,
BasicStroke.JOIN_ROUND, 1f, new float[] { 3f, 3f }, 0f).null).public void setGridlineStrokeForRows(java.awt.Stroke stroke)
Plot3DChangeEvent to all
registered listeners.stroke - the stroke (null not permitted).public boolean getGridlinesVisibleForColumns()
true if gridlines are shown for the column axis
and false otherwise. The default value is false.public void setGridlinesVisibleForColumns(boolean visible)
Plot3DChangeEvent to all registered
listeners.visible - the new flag value.public boolean getGridlinesVisibleForValues()
true if gridlines are shown for the column axis
and false otherwise. The default value is true.public void setGridlinesVisibleForValues(boolean visible)
Plot3DChangeEvent to all registered
listeners.visible - the new flag value.public java.awt.Paint getGridlinePaintForValues()
Color.WHITE.null).public void setGridlinePaintForValues(java.awt.Paint paint)
Plot3DChangeEvent to all registered listeners.paint - the paint (null not permitted).public java.awt.Stroke getGridlineStrokeForValues()
BasicStroke(0.5f, BasicStroke.CAP_ROUND,
BasicStroke.JOIN_ROUND, 1f, new float[] { 3f, 3f }, 0f).null).public void setGridlineStrokeForValues(java.awt.Stroke stroke)
Plot3DChangeEvent to all
registered listeners.stroke - the stroke (null not permitted).public java.awt.Paint getGridlinePaintForColumns()
Color.WHITE.null).public void setGridlinePaintForColumns(java.awt.Paint paint)
Plot3DChangeEvent to all
registered listeners.paint - the paint (null not permitted).public java.awt.Stroke getGridlineStrokeForColumns()
BasicStroke(0.5f, BasicStroke.CAP_ROUND,
BasicStroke.JOIN_ROUND, 1f, new float[] { 3f, 3f }, 0f).null).public void setGridlineStrokeForColumns(java.awt.Stroke stroke)
Plot3DChangeEvent to all
registered listeners.stroke - the stroke (null not permitted).public CategoryLabelGenerator getLegendLabelGenerator()
null).public void setLegendLabelGenerator(CategoryLabelGenerator generator)
Plot3DChangeEvent
to all registered listeners.generator - the generator (null not permitted).public java.lang.Double getYDimensionOverride()
null,
which means that when the plot dimensions are automatically calculated,
the height of the plot will be set to the greater of the width and
the depth.null).public void setYDimensionOverride(java.lang.Double dim)
autoAdjustDimensions
flag is set, recalculates the dimensions and sends a
Plot3DChangeEvent to all registered listeners.dim - the new y-dimension override (null permitted).public CategoryItemLabelGenerator getToolTipGenerator()
null).public void setToolTipGenerator(CategoryItemLabelGenerator generator)
Plot3DChangeEvent to all
registered listeners.generator - the new generator (null permitted).public java.util.List<LegendItemInfo> getLegendInfo()
getLegendInfo in interface Plot3Dnull).public void compose(World world, double xOffset, double yOffset, double zOffset)
Plot3Dpublic java.lang.String generateToolTipText(ItemKey itemKey)
AbstractPlot3Dnull if no tool tip is required.generateToolTipText in interface Plot3DgenerateToolTipText in class AbstractPlot3DitemKey - the item key (null not permitted).null).public void receive(ChartElementVisitor visitor)
receive() method for each of the plot's axes and the renderer,
then performs the visitor's function on the plot. This is a general
purpose mechanism, but the main use is to apply chart style changes
across all the elements of a chart.receive in interface ChartElementreceive in class AbstractPlot3Dvisitor - the visitor (null not permitted).public boolean equals(java.lang.Object obj)
equals in class AbstractPlot3Dobj - the object (null permitted).public void datasetChanged(Dataset3DChangeEvent event)
autoAdjustDimensions flag), reconfiguring the axes, and
propagating a Plot3DChangeEvent.datasetChanged in interface Dataset3DChangeListenerdatasetChanged in class AbstractPlot3Devent - the change event.public void axisChanged(Axis3DChangeEvent event)
Plot3DChangeEvent that will usually cause the chart
to be repainted.axisChanged in interface Axis3DChangeListenerevent - the change event.public void rendererChanged(Renderer3DChangeEvent event)
Plot3DChangeEvent that will usually cause
the chart to be repainted.rendererChanged in interface Renderer3DChangeListenerevent - information about the event.