|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jfree.chart.renderer.AbstractRenderer | +--org.jfree.chart.renderer.AbstractCategoryItemRenderer | +--org.jfree.chart.renderer.BarRenderer
A base class for category item renderers that draw bars.
Field Summary | |
static double |
BAR_OUTLINE_WIDTH_THRESHOLD
Constant that controls the minimum width before a bar has an outline drawn. |
static double |
DEFAULT_ITEM_MARGIN
The default item margin percentage. |
Fields inherited from class org.jfree.chart.renderer.AbstractRenderer |
DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, DEFAULT_PAINT, DEFAULT_SHAPE, DEFAULT_STROKE |
Fields inherited from interface org.jfree.chart.renderer.CategoryItemRenderer |
STACKED, STANDARD |
Constructor Summary | |
protected |
BarRenderer(CategoryToolTipGenerator toolTipGenerator,
CategoryURLGenerator urlGenerator)
Constructs a bar renderer. |
Method Summary | |
double |
getBarWidth()
Returns the bar width. |
double |
getItemMargin()
Returns the item margin. |
double |
getLowerClip()
Returns the lower clip value. |
double |
getUpperClip()
Returns the upper clip value. |
double |
getZeroInJava2D()
Returns the zero value in Java2D coordinates. |
void |
initialise(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
CategoryPlot plot,
ChartRenderingInfo info)
Initialises the renderer. |
protected void |
setBarWidth(double width)
Updates the calculated bar width. |
void |
setItemMargin(double percent)
Sets the item margin. |
Methods inherited from class org.jfree.chart.renderer.AbstractCategoryItemRenderer |
drawBackground, drawDomainGridline, drawOutline, drawRangeGridline, drawRangeMarker, equals, getColumnCount, getLegendItem, getRangeType, getRowCount, getToolTipGenerator, getURLGenerator, setToolTipGenerator, setURLGenerator |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jfree.chart.renderer.CategoryItemRenderer |
drawItem, getItemOutlinePaint, getItemPaint, getItemShape, getItemStroke, getSeriesOutlinePaint, getSeriesPaint, getSeriesShape, getSeriesStroke |
Field Detail |
public static final double DEFAULT_ITEM_MARGIN
public static final double BAR_OUTLINE_WIDTH_THRESHOLD
Constructor Detail |
protected BarRenderer(CategoryToolTipGenerator toolTipGenerator, CategoryURLGenerator urlGenerator)
toolTipGenerator
- the tool tip generator (null
permitted).urlGenerator
- the URL generator (null
permitted).Method Detail |
public double getItemMargin()
public void setItemMargin(double percent)
percent
- the new margin.public double getBarWidth()
protected void setBarWidth(double width)
width
- the new width.public double getZeroInJava2D()
This value is recalculated in the initialise() method.
public double getLowerClip()
This value is recalculated in the initialise() method.
public double getUpperClip()
This value is recalculated in the initialise() method.
public void initialise(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, ChartRenderingInfo info)
This method gets called once at the start of the process of drawing a chart.
initialise
in interface CategoryItemRenderer
initialise
in class AbstractCategoryItemRenderer
g2
- the graphics device.dataArea
- the area in which the data is to be plotted.plot
- the plot.info
- collects chart rendering information for return to caller.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |