public class PiePlot3D extends AbstractPlot3D implements java.io.Serializable
createPieChart() method in the Chart3DFactory class.
A typical pie chart will look like this:
| Modifier and Type | Field and Description |
|---|---|
static java.awt.Font |
DEFAULT_SECTION_LABEL_FONT
The default font for section labels on the chart.
|
autoAdjustDimensions, dimensions| Constructor and Description |
|---|
PiePlot3D(PieDataset3D dataset)
Creates a new pie plot in 3D.
|
| Modifier and Type | Method and Description |
|---|---|
void |
compose(World world,
double xOffset,
double yOffset,
double zOffset)
Adds 3D objects representing the current data for the plot to the
specified world.
|
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. |
PieDataset3D |
getDataset()
Returns the dataset.
|
double |
getDepth()
Returns the depth of the pie (the default value is 2.0).
|
Dimension3D |
getDimensions()
Returns the dimensions for the plot.
|
java.util.List<Object3D> |
getLabelFaces(double xOffset,
double yOffset,
double zOffset)
Returns a list of label faces for the plot.
|
java.util.List<LegendItemInfo> |
getLegendInfo()
Returns a list containing legend item info, typically one item for
each series in the chart.
|
PieLabelGenerator |
getLegendLabelGenerator()
Returns the object that creates legend labels for each section of the pie
chart.
|
double |
getRadius()
Returns the radius of the pie (the default value is 8.0).
|
ColorSource |
getSectionColorSource()
Returns the color source for section colors.
|
ColorSource |
getSectionLabelColorSource()
Returns the color source for section labels.
|
FontSource |
getSectionLabelFontSource()
Returns the font source that is used to determine the font to use for
the section labels.
|
PieLabelGenerator |
getSectionLabelGenerator()
Returns the object that creates labels for each section of the pie
chart.
|
int |
getSegmentCount()
Returns the number of segments used when composing the 3D objects
representing the pie chart.
|
PieLabelGenerator |
getToolTipGenerator()
Returns the tool tip generator.
|
int |
hashCode() |
void |
receive(ChartElementVisitor visitor)
Receives a visitor.
|
void |
setDataset(PieDataset3D dataset)
Sets the dataset and notifies registered listeners that the dataset has
been updated.
|
void |
setDepth(double depth)
Sets the depth of the pie chart and sends a change event to all
registered listeners.
|
void |
setLegendLabelGenerator(PieLabelGenerator generator)
Sets the object that creates legend labels for each section of the pie
chart, and sends a
Plot3DChangeEvent to all registered
listeners. |
void |
setRadius(double radius)
Sets the radius of the pie chart and sends a change event to all
registered listeners.
|
void |
setSectionColors(java.awt.Color... colors)
Sets a new color source for the plot using the specified colors and
sends a
Plot3DChangeEvent to all registered listeners. |
void |
setSectionColorSource(ColorSource source)
Sets the color source and sends a
Plot3DChangeEvent to all
registered listeners. |
void |
setSectionLabelColorSource(ColorSource source)
Sets the color source for the section labels and sends a
Plot3DChangeEvent to all registered listeners. |
void |
setSectionLabelFontSource(FontSource source)
Sets the font source and sends a
Plot3DChangeEvent to all
registered listeners. |
void |
setSectionLabelGenerator(PieLabelGenerator generator)
Sets the object that creates labels for each section of the pie chart,
and sends a
Plot3DChangeEvent to all registered listeners. |
void |
setSegmentCount(int count)
Sets the number of segments used when composing the pie chart and
sends a
Plot3DChangeEvent to all registered listeners. |
void |
setToolTipGenerator(PieLabelGenerator generator)
Sets the tool tip generator and sends a change event to all registered
listeners.
|
addChangeListener, datasetChanged, fireChangeEvent, getChart, isAutoAdjustDimensions, isNotify, notifyListeners, removeChangeListener, setChart, setNotifypublic static final java.awt.Font DEFAULT_SECTION_LABEL_FONT
public PiePlot3D(PieDataset3D dataset)
dataset - the dataset (null not permitted).public PieDataset3D getDataset()
null).public void setDataset(PieDataset3D dataset)
dataset - the dataset (null not permitted).public double getRadius()
public void setRadius(double radius)
radius - the radius.public double getDepth()
public void setDepth(double depth)
depth - the depth.public ColorSource getSectionColorSource()
null).public void setSectionColorSource(ColorSource source)
Plot3DChangeEvent to all
registered listeners.source - the color source (null not permitted).public void setSectionColors(java.awt.Color... colors)
Plot3DChangeEvent to all registered listeners. This
is a convenience method that is equivalent to
setSectionColorSource(new StandardColorSource(colors)).colors - one or more colors (null not permitted).public PieLabelGenerator getSectionLabelGenerator()
null).public void setSectionLabelGenerator(PieLabelGenerator generator)
Plot3DChangeEvent to all registered listeners.generator - the generator (null not permitted).public FontSource getSectionLabelFontSource()
null).public void setSectionLabelFontSource(FontSource source)
Plot3DChangeEvent to all
registered listeners.source - the source (null not permitted).public ColorSource getSectionLabelColorSource()
StandardColorSource that always returns
Color.BLACK.null).setSectionLabelColorSource(ColorSource)public void setSectionLabelColorSource(ColorSource source)
Plot3DChangeEvent to all registered listeners.source - the color source.getSectionLabelColorSource()public PieLabelGenerator getLegendLabelGenerator()
null).public void setLegendLabelGenerator(PieLabelGenerator generator)
Plot3DChangeEvent to all registered
listeners.generator - the generator (null not permitted).public PieLabelGenerator getToolTipGenerator()
null).public void setToolTipGenerator(PieLabelGenerator generator)
generator - the generator (null permitted).public Dimension3D getDimensions()
getDimensions in interface Plot3DgetDimensions in class AbstractPlot3DAbstractPlot3D.isAutoAdjustDimensions()public int getSegmentCount()
40.public void setSegmentCount(int count)
Plot3DChangeEvent to all registered listeners. A higher
number will result in a more rounded pie chart, but will take longer
to render.count - the count.public java.util.List<LegendItemInfo> getLegendInfo()
getLegendInfo in interface Plot3Dpublic void compose(World world, double xOffset, double yOffset, double zOffset)
Chart3D class, you won't normally call it directly.public java.util.List<Object3D> getLabelFaces(double xOffset, double yOffset, double zOffset)
Chart3D class - you won't normally call it directly.xOffset - the x-offset.yOffset - the y-offset.zOffset - the z-offset.public 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 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 not permitted).public int hashCode()
hashCode in class java.lang.Object