public class BarRenderer3D extends AbstractCategoryRenderer3D implements java.io.Serializable
CategoryDataset3D (for
use with a CategoryPlot3D). For example:
BarChart3DDemo1.java for the code to generate the
above chart).
Chart3DFactory.createBarChart(String, String, CategoryDataset3D,
String, String, String).
TRANSPARENT_COLOR| Constructor and Description |
|---|
BarRenderer3D()
Creates a new renderer with default attribute values.
|
| Modifier and Type | Method and Description |
|---|---|
void |
composeItem(CategoryDataset3D dataset,
int series,
int row,
int column,
World world,
Dimension3D dimensions,
double xOffset,
double yOffset,
double zOffset)
Constructs and places one item from the specified dataset into the given
world.
|
protected void |
composeItem(double value,
double barBase,
CategoryDataset3D dataset,
int series,
int row,
int column,
World world,
Dimension3D dimensions,
double xOffset,
double yOffset,
double zOffset)
Performs the actual work of composing a bar to represent one item in the
dataset.
|
protected void |
drawItemLabels(World world,
CategoryDataset3D dataset,
KeyedValues3DItemKey itemKey,
double xw,
double yw,
double zw,
double basew,
boolean inverted) |
boolean |
equals(java.lang.Object obj)
Tests this renderer for equality with an arbitrary object.
|
Range |
findValueRange(Values3D<? extends java.lang.Number> data)
Returns the range of values that will be required on the value axis
to see all the data from the dataset.
|
double |
getBarXWidth()
Returns the bar width as a percentage of the column width.
|
double |
getBarZWidth()
Returns the bar width as a percentage of the row width.
|
double |
getBase()
Returns the base value for the bars.
|
CategoryColorSource |
getBaseColorSource()
Returns the object used to fetch the color for the base of bars
where the base of the bar is "cropped" (on account of the base value
falling outside of the bounds of the y-axis).
|
CategoryColorSource |
getTopColorSource()
Returns the object used to fetch the color for the top of bars
where the top of the bar is "cropped" (on account of the data value
falling outside of the bounds of the y-axis).
|
void |
setBarXWidth(double barXWidth)
Sets the the bar width as a percentage of the column width and
fires a
Renderer3DChangeEvent. |
void |
setBarZWidth(double barZWidth)
Sets the the bar width as a percentage of the row width and
fires a
Renderer3DChangeEvent. |
void |
setBase(double base)
Sets the base value for the bars and fires a
Renderer3DChangeEvent. |
void |
setBaseColorSource(CategoryColorSource source)
Sets the object that determines the color to use for the base of bars
where the base value falls outside the axis range, and sends a
Renderer3DChangeEvent to all registered listeners. |
void |
setTopColorSource(CategoryColorSource source)
Sets the object used to fetch the color for the top of bars where the
top of the bar is "cropped", and sends a
Renderer3DChangeEvent
to all registered listeners. |
getColorSource, getItemLabelGenerator, getItemLabelOffsets, getPlot, setColors, setColorSource, setItemLabelGenerator, setItemLabelOffsets, setPlotaddChangeListener, fireChangeEvent, getItemLabelBackgroundColor, getItemLabelColor, getItemLabelFont, getItemLabelPositioning, isNotify, notifyListeners, receive, removeChangeListener, setItemLabelBackgroundColor, setItemLabelColor, setItemLabelFont, setItemLabelPositioning, setNotifyclone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddChangeListener, removeChangeListenerreceivepublic BarRenderer3D()
public double getBase()
0.0.setBase(double)public void setBase(double base)
Renderer3DChangeEvent.base - the new base value.getBase()public double getBarXWidth()
0.8 (the total width of each column
in world units is 1.0, so the default leaves a small gap
between each bar).public void setBarXWidth(double barXWidth)
Renderer3DChangeEvent.barXWidth - the new width.public double getBarZWidth()
0.8.public void setBarZWidth(double barZWidth)
Renderer3DChangeEvent.barZWidth - the new width.public CategoryColorSource getBaseColorSource()
null, the regular series color
will be used for the top of the bars.null).public void setBaseColorSource(CategoryColorSource source)
Renderer3DChangeEvent to all registered listeners. If you set
this to null, the regular series color will be used to draw
the base of the bar, but it will be harder for the end-user to know that
only a section of the bar is visible in the chart. Note that the
default base paint source returns Color.WHITE always.source - the source (null permitted).getBaseColorSource(),
getTopColorSource()public CategoryColorSource getTopColorSource()
null, the regular series color
will be used for the top of the bars.null).public void setTopColorSource(CategoryColorSource source)
Renderer3DChangeEvent
to all registered listeners.source - the source (null permitted).getTopColorSource(),
getBaseColorSource()public Range findValueRange(Values3D<? extends java.lang.Number> data)
findValueRange in interface CategoryRenderer3DfindValueRange in class AbstractCategoryRenderer3Ddata - the data (null not permitted).null)public void composeItem(CategoryDataset3D dataset, int series, int row, int column, World world, Dimension3D dimensions, double xOffset, double yOffset, double zOffset)
CategoryPlot3D class
while iterating over the items in the dataset.composeItem in interface CategoryRenderer3Ddataset - the dataset (null not permitted).series - the series index.row - the row index.column - the column index.world - the world (null not permitted).dimensions - the plot dimensions (null not permitted).xOffset - the x-offset.yOffset - the y-offset.zOffset - the z-offset.protected void composeItem(double value, double barBase, CategoryDataset3D dataset, int series, int row, int column, World world, Dimension3D dimensions, double xOffset, double yOffset, double zOffset)
StackedBarRenderer3D
subclass.value - the data value (top of the bar).barBase - the base value for the bar.dataset - the dataset.series - the series index.row - the row index.column - the column index.world - the world.dimensions - the plot dimensions.xOffset - the x-offset.yOffset - the y-offset.zOffset - the z-offset.protected void drawItemLabels(World world, CategoryDataset3D dataset, KeyedValues3DItemKey itemKey, double xw, double yw, double zw, double basew, boolean inverted)
public boolean equals(java.lang.Object obj)
equals in class AbstractCategoryRenderer3Dobj - the object (null permitted).