|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.jrefinery.chart.AbstractCategoryItemRenderer
com.jrefinery.chart.BarRenderer
public abstract class BarRenderer
A base class for category item renderers that draw bars.
| Field Summary | |
|---|---|
protected static double |
BAR_OUTLINE_WIDTH_THRESHOLD
Constant that controls the minimum width before a bar has an outline drawn. |
protected double |
categoryGapSpan
The total width of the category gaps. |
protected double |
categorySpan
The total width of the categories. |
protected double |
itemGapSpan
The total width of the item gaps. |
protected double |
itemSpan
The total width of the items within a category. |
protected double |
itemWidth
The width of a single item. |
protected double |
zeroInJava2D
The data value ZERO translated to Java2D user space. |
| Fields inherited from class com.jrefinery.chart.AbstractCategoryItemRenderer |
|---|
info, toolTipGenerator |
| Constructor Summary | |
|---|---|
BarRenderer(com.jrefinery.chart.tooltips.CategoryToolTipGenerator toolTipGenerator)
|
|
| Method Summary | |
|---|---|
abstract int |
barWidthsPerCategory(CategoryDataset data)
Returns the number of bar widths per category, which depends on whether or not the renderer stacks bars. |
protected void |
calculateCategoryAndItemSpans(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
CategoryPlot plot,
CategoryDataset data,
double span)
Calculates some dimensions required for plotting the bars. |
abstract boolean |
hasItemGaps()
Returns true if there are gaps between items within a category, and false otherwise. |
void |
initialise(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
CategoryPlot plot,
CategoryDataset data,
ChartRenderingInfo info)
Initialises the renderer. |
boolean |
isStacked()
Returns a flag indicating whether or not the renderer stacks values within each category. |
| Methods inherited from class com.jrefinery.chart.AbstractCategoryItemRenderer |
|---|
drawPlotBackground, getAxisArea, getDataClipRegion, getToolTipGenerator, setToolTipGenerator |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.jrefinery.chart.CategoryItemRenderer |
|---|
drawCategoryItem, drawRangeMarker |
| Field Detail |
|---|
protected static final double BAR_OUTLINE_WIDTH_THRESHOLD
protected double categorySpan
protected double categoryGapSpan
protected double itemSpan
protected double itemGapSpan
protected double itemWidth
protected double zeroInJava2D
| Constructor Detail |
|---|
public BarRenderer(com.jrefinery.chart.tooltips.CategoryToolTipGenerator toolTipGenerator)
| Method Detail |
|---|
public void initialise(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
CategoryPlot plot,
CategoryDataset data,
ChartRenderingInfo info)
This method gets called once at the start of the process of drawing a chart.
initialise in interface CategoryItemRendererinitialise in class AbstractCategoryItemRendererg2 - The graphics device.dataArea - The area in which the data is to be plotted.plot - The plot.data - The data.info - Collects chart rendering information for return to caller.public abstract int barWidthsPerCategory(CategoryDataset data)
data - The dataset.public abstract boolean hasItemGaps()
protected void calculateCategoryAndItemSpans(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
CategoryPlot plot,
CategoryDataset data,
double span)
g2 - The graphics device.dataArea - The area within the axes.plot - The plot.data - The data.span - ???public boolean isStacked()
Subclasses should override this method as necessary.
isStacked in interface CategoryItemRendererisStacked in class AbstractCategoryItemRenderer
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||