|
||||||||
| 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.HorizontalIntervalBarRenderer
public class HorizontalIntervalBarRenderer
A renderer that draws horizontal bars representing a data range on a category plot.
One application of this renderer is the creation of Gantt charts.
| Field Summary |
|---|
| 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 | |
|---|---|
HorizontalIntervalBarRenderer()
The default constructor. |
|
HorizontalIntervalBarRenderer(com.jrefinery.chart.tooltips.CategoryToolTipGenerator toolTipGenerator)
Constructs a new renderer with the specified tool tip generator. |
|
| Method Summary | |
|---|---|
int |
barWidthsPerCategory(CategoryDataset data)
This renderer shows each series within a category as a separate bar (as opposed to a stacked bar renderer). |
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)
Draw a single data item. |
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. |
boolean |
hasItemGaps()
Returns true, since for this renderer there are gaps between the items in one category. |
void |
initialise(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
CategoryPlot plot,
CategoryDataset data,
ChartRenderingInfo info)
Initialises the renderer. |
| Methods inherited from class com.jrefinery.chart.BarRenderer |
|---|
calculateCategoryAndItemSpans, isStacked |
| 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 |
|---|
drawPlotBackground, getAxisArea, getDataClipRegion, isStacked |
| Constructor Detail |
|---|
public HorizontalIntervalBarRenderer()
public HorizontalIntervalBarRenderer(com.jrefinery.chart.tooltips.CategoryToolTipGenerator toolTipGenerator)
toolTipGenerator - The tool tip generator.| 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 BarRendererg2 - 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 boolean hasItemGaps()
hasItemGaps in class BarRendererpublic int barWidthsPerCategory(CategoryDataset data)
barWidthsPerCategory in class BarRendererdata - The data.
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 CategoryItemRendererg2 - 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 CategoryItemRendererg2 - The graphics device.plotArea - The data plot 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 (will be null when the first category is
drawn).
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||