|
||||||||
| 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
com.jrefinery.chart.HorizontalBarRenderer
com.jrefinery.chart.HorizontalBarRenderer3D
public class HorizontalBarRenderer3D
A renderer that handles the drawing of 3D bars for a horizontal bar plot.
| Field Summary | |
|---|---|
protected double |
effect3d
The size of the 3D effect (in pixels). |
| Fields inherited from class com.jrefinery.chart.BarRenderer |
|---|
BAR_OUTLINE_WIDTH_THRESHOLD, categoryGapSpan, categorySpan, itemGapSpan, itemSpan, itemWidth, zeroInJava2D |
| Fields inherited from class com.jrefinery.chart.AbstractCategoryItemRenderer |
|---|
info, toolTipGenerator |
| Constructor Summary | |
|---|---|
HorizontalBarRenderer3D()
Default constructor. |
|
HorizontalBarRenderer3D(com.jrefinery.chart.tooltips.CategoryToolTipGenerator toolTipGenerator,
double effect3d)
Constructs a new renderer. |
|
| Method Summary | |
|---|---|
int |
barWidthsPerCategory(CategoryDataset data)
Returns the number of bar widths in each category (used to calculate the width of a single bar). |
void |
drawCategoryItem(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
CategoryPlot plot,
ValueAxis axis,
CategoryDataset data,
int series,
java.lang.Object category,
int categoryIndex,
java.lang.Object previousCategory)
Draws the bar for a single (series, category) data item. |
void |
drawPlotBackground(java.awt.Graphics2D g2,
CategoryPlot plot,
java.awt.geom.Rectangle2D axisDataArea,
java.awt.Shape dataClipRegion)
Draws the background for the plot. |
void |
drawRangeMarker(java.awt.Graphics2D g2,
CategoryPlot plot,
ValueAxis axis,
Marker marker,
java.awt.geom.Rectangle2D axisDataArea,
java.awt.Shape dataClipRegion)
Draws a vertical line across the chart to represent the marker. |
java.awt.geom.Rectangle2D |
getAxisArea(java.awt.geom.Rectangle2D plotArea)
Returns the area that the axes (and date) must fit into. |
java.awt.Shape |
getDataClipRegion(java.awt.geom.Rectangle2D dataArea)
Returns the clip region...usually returns the dataArea, but some charts (e.g. |
boolean |
hasItemGaps()
Returns true to indicate that this renderer does allow for gaps between items. |
| Methods inherited from class com.jrefinery.chart.HorizontalBarRenderer |
|---|
initialise |
| Methods inherited from class com.jrefinery.chart.BarRenderer |
|---|
calculateCategoryAndItemSpans, isStacked |
| Methods inherited from class com.jrefinery.chart.AbstractCategoryItemRenderer |
|---|
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 |
|---|
isStacked |
| Field Detail |
|---|
protected double effect3d
| Constructor Detail |
|---|
public HorizontalBarRenderer3D()
public HorizontalBarRenderer3D(com.jrefinery.chart.tooltips.CategoryToolTipGenerator toolTipGenerator,
double effect3d)
| Method Detail |
|---|
public boolean hasItemGaps()
hasItemGaps in class HorizontalBarRendererpublic int barWidthsPerCategory(CategoryDataset data)
barWidthsPerCategory in class HorizontalBarRendererdata - The data.public java.awt.geom.Rectangle2D getAxisArea(java.awt.geom.Rectangle2D plotArea)
Often this is the same as the plotArea, but sometimes a smaller region should be used (for example, the 3D charts require the axes to use less space in order to leave room for the 'depth' part of the chart).
getAxisArea in interface CategoryItemRenderergetAxisArea in class AbstractCategoryItemRendererplotArea - The plot area.public java.awt.Shape getDataClipRegion(java.awt.geom.Rectangle2D dataArea)
getDataClipRegion in interface CategoryItemRenderergetDataClipRegion in class AbstractCategoryItemRendererdataArea - The data area.
public void drawPlotBackground(java.awt.Graphics2D g2,
CategoryPlot plot,
java.awt.geom.Rectangle2D axisDataArea,
java.awt.Shape dataClipRegion)
For most charts, the axisDataArea and the dataClipArea are the same. One case where they are different is the 3D-effect bar charts...here the data clip area extends above and to the right of the axisDataArea.
drawPlotBackground in interface CategoryItemRendererdrawPlotBackground in class AbstractCategoryItemRendererg2 - The graphics device.plot - The plot.axisDataArea - The area inside the axes.dataClipArea - The data clip area.
public void drawRangeMarker(java.awt.Graphics2D g2,
CategoryPlot plot,
ValueAxis axis,
Marker marker,
java.awt.geom.Rectangle2D axisDataArea,
java.awt.Shape dataClipRegion)
drawRangeMarker in interface CategoryItemRendererdrawRangeMarker in class HorizontalBarRendererg2 - The graphics device.plot - The plot.axis - The value axis.marker - The marker line.axisDataArea - The axis data area.dataClipRegion - The data clip region.
public void drawCategoryItem(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
CategoryPlot plot,
ValueAxis axis,
CategoryDataset data,
int series,
java.lang.Object category,
int categoryIndex,
java.lang.Object previousCategory)
drawCategoryItem in interface CategoryItemRendererdrawCategoryItem in class HorizontalBarRendererg2 - The graphics device.dataArea - The data area.plot - The plot.axis - The range axis.data - The data.series - The series number (zero-based index).category - The category.categoryIndex - The category number (zero-based index).previousCategory - The previous category.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||