Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jfree.chart.renderer.category
Class LayeredBarRenderer

    java.lang.Object
      org.jfree.chart.renderer.AbstractRenderer
          org.jfree.chart.renderer.category.AbstractCategoryItemRenderer
              org.jfree.chart.renderer.category.BarRenderer
                  org.jfree.chart.renderer.category.LayeredBarRenderer

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, LegendItemSource, CategoryItemRenderer, org.jfree.util.PublicCloneable

    public class LayeredBarRenderer

extends BarRenderer
implements java.io.Serializable

A `CategoryItemRenderer` that represents data using bars which are superimposed.

See Also:
  Serialized Form

Field Summary
`protected org.jfree.util.ObjectList` | `seriesBarWidthList` A list of the width of each series bar.

Fields inherited from class org.jfree.chart.renderer.category.BarRenderer
`BAR_OUTLINE_WIDTH_THRESHOLD, DEFAULT_ITEM_MARGIN`

Fields inherited from class org.jfree.chart.renderer.AbstractRenderer
`DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, DEFAULT_PAINT, DEFAULT_SHAPE, DEFAULT_STROKE, DEFAULT_VALUE_LABEL_FONT, DEFAULT_VALUE_LABEL_PAINT, ZERO`

Constructor Summary
`LayeredBarRenderer()` Default constructor.

Method Summary
`protected void` | `calculateBarWidth(CategoryPlot plot, java.awt.geom.Rectangle2D dataArea, int rendererIndex, CategoryItemRendererState state)` Calculates the bar width and stores it in the renderer state.
`protected void` | `drawHorizontalItem(java.awt.Graphics2D g2, CategoryItemRendererState state, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset data, int row, int column)` Draws the bar for a single (series, category) data item.
`void` | `drawItem(java.awt.Graphics2D g2, CategoryItemRendererState state, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset data, int row, int column, int pass)` Draws the bar for one item in the dataset.
`protected void` | `drawVerticalItem(java.awt.Graphics2D g2, CategoryItemRendererState state, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset data, int row, int column)` Draws the bar for a single (series, category) data item.
`double` | `getSeriesBarWidth(int series)` Returns the bar width for a series, or `Double.NaN` if no width has been set.
`void` | `setSeriesBarWidth(int series, double width)` Sets the width of the bars of a series.

Methods inherited from class org.jfree.chart.renderer.category.BarRenderer
`calculateBarL0L1, calculateBarW0, calculateSeriesWidth, drawItemLabel, equals, findRangeBounds, getBase, getGradientPaintTransformer, getIncludeBaseInRange, getItemMargin, getLegendItem, getLowerClip, getMaximumBarWidth, getMinimumBarLength, getNegativeItemLabelPositionFallback, getPositiveItemLabelPositionFallback, getUpperClip, initialise, isDrawBarOutline, setBase, setDrawBarOutline, setGradientPaintTransformer, setIncludeBaseInRange, setItemMargin, setMaximumBarWidth, setMinimumBarLength, setNegativeItemLabelPositionFallback, setPositiveItemLabelPositionFallback`

Methods inherited from class org.jfree.chart.renderer.category.AbstractCategoryItemRenderer
`addItemEntity, calculateDomainMarkerTextAnchorPoint, calculateRangeMarkerTextAnchorPoint, clone, createState, drawBackground, drawDomainGridline, drawDomainMarker, drawItemLabel, drawOutline, drawRangeGridline, drawRangeMarker, getBaseItemLabelGenerator, getBaseItemURLGenerator, getBaseToolTipGenerator, getColumnCount, getDomainAxis, getDrawingSupplier, getItemLabelGenerator, getItemURLGenerator, getLegendItemLabelGenerator, getLegendItems, getLegendItemToolTipGenerator, getLegendItemURLGenerator, getPassCount, getPlot, getRangeAxis, getRowCount, getSeriesItemLabelGenerator, getSeriesItemURLGenerator, getSeriesToolTipGenerator, getToolTipGenerator, getToolTipGenerator, hashCode, setBaseItemLabelGenerator, setBaseItemURLGenerator, setBaseToolTipGenerator, setItemLabelGenerator, setItemURLGenerator, setLegendItemLabelGenerator, setLegendItemToolTipGenerator, setLegendItemURLGenerator, setPlot, setSeriesItemLabelGenerator, setSeriesItemURLGenerator, setSeriesToolTipGenerator, setToolTipGenerator`

Methods inherited from class org.jfree.chart.renderer.AbstractRenderer
`addChangeListener, calculateLabelAnchorPoint, fireChangeEvent, getBaseCreateEntities, getBaseFillPaint, getBaseItemLabelFont, getBaseItemLabelPaint, getBaseItemLabelsVisible, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseSeriesVisible, getBaseSeriesVisibleInLegend, getBaseShape, getBaseStroke, getCreateEntities, getItemCreateEntity, getItemFillPaint, getItemLabelAnchorOffset, getItemLabelFont, getItemLabelFont, getItemLabelPaint, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemVisible, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getSeriesCreateEntities, getSeriesFillPaint, getSeriesItemLabelFont, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesVisible, getSeriesVisible, getSeriesVisibleInLegend, getSeriesVisibleInLegend, hasListener, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, notifyListeners, removeChangeListener, setBaseCreateEntities, setBaseCreateEntities, setBaseFillPaint, setBaseFillPaint, setBaseItemLabelFont, setBaseItemLabelFont, setBaseItemLabelPaint, setBaseItemLabelPaint, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlinePaint, setBaseOutlineStroke, setBaseOutlineStroke, setBasePaint, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseSeriesVisible, setBaseSeriesVisible, setBaseSeriesVisibleInLegend, setBaseSeriesVisibleInLegend, setBaseShape, setBaseShape, setBaseStroke, setBaseStroke, setCreateEntities, setCreateEntities, setFillPaint, setFillPaint, setItemLabelAnchorOffset, setItemLabelFont, setItemLabelFont, setItemLabelPaint, setItemLabelPaint, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, setNegativeItemLabelPosition, setNegativeItemLabelPosition, setOutlinePaint, setOutlinePaint, setOutlineStroke, setOutlineStroke, setPaint, setPaint, setPositiveItemLabelPosition, setPositiveItemLabelPosition, setSeriesCreateEntities, setSeriesCreateEntities, setSeriesFillPaint, setSeriesFillPaint, setSeriesItemLabelFont, setSeriesItemLabelFont, setSeriesItemLabelPaint, setSeriesItemLabelPaint, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesNegativeItemLabelPosition, setSeriesNegativeItemLabelPosition, setSeriesOutlinePaint, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesOutlineStroke, setSeriesPaint, setSeriesPaint, setSeriesPositiveItemLabelPosition, setSeriesPositiveItemLabelPosition, setSeriesShape, setSeriesShape, setSeriesStroke, setSeriesStroke, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setShape, setShape, setStroke, setStroke`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.jfree.util.PublicCloneable
`clone`

Methods inherited from interface org.jfree.chart.renderer.category.CategoryItemRenderer
`addChangeListener, getBaseItemLabelFont, getBaseItemLabelPaint, getBaseItemLabelsVisible, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseSeriesVisible, getBaseSeriesVisibleInLegend, getBaseShape, getBaseStroke, getItemLabelFont, getItemLabelFont, getItemLabelPaint, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemVisible, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getSeriesItemLabelFont, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesVisible, getSeriesVisible, getSeriesVisibleInLegend, getSeriesVisibleInLegend, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, removeChangeListener, setBaseItemLabelFont, setBaseItemLabelPaint, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlineStroke, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseSeriesVisible, setBaseSeriesVisible, setBaseSeriesVisibleInLegend, setBaseSeriesVisibleInLegend, setBaseShape, setBaseStroke, setItemLabelFont, setItemLabelPaint, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, setNegativeItemLabelPosition, setNegativeItemLabelPosition, setOutlinePaint, setOutlineStroke, setPaint, setPositiveItemLabelPosition, setPositiveItemLabelPosition, setSeriesItemLabelFont, setSeriesItemLabelPaint, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesNegativeItemLabelPosition, setSeriesNegativeItemLabelPosition, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesPaint, setSeriesPositiveItemLabelPosition, setSeriesPositiveItemLabelPosition, setSeriesShape, setSeriesStroke, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setShape, setStroke`

Field Detail

### seriesBarWidthList

    protected org.jfree.util.ObjectList seriesBarWidthList

  A list of the width of each series bar.

Constructor Detail

### LayeredBarRenderer

    public LayeredBarRenderer()

  Default constructor.

Method Detail

### getSeriesBarWidth

    public double getSeriesBarWidth(int series)

  Returns the bar width for a series, or `Double.NaN` if no width has been set.

  Parameters:
    `series` - the series index (zero based).
  Returns:
    The width for the series (1.0=100%, it is the maximum).

### setSeriesBarWidth

    public void setSeriesBarWidth(int series,
                                  double width)

  Sets the width of the bars of a series.

  Parameters:
    `series` - the series index (zero based).
    `width` - the width of the series bar in percentage (1.0=100%, it is the maximum).

### calculateBarWidth

    protected void calculateBarWidth(CategoryPlot plot,
                                     java.awt.geom.Rectangle2D dataArea,
                                     int rendererIndex,
                                     CategoryItemRendererState state)

  Calculates the bar width and stores it in the renderer state.

  Overrides:
    `calculateBarWidth` in class `BarRenderer`
  Parameters:
    `plot` - the plot.
    `dataArea` - the data area.
    `rendererIndex` - the renderer index.
    `state` - the renderer state.

### drawItem

    public void drawItem(java.awt.Graphics2D g2,
                         CategoryItemRendererState state,
                         java.awt.geom.Rectangle2D dataArea,
                         CategoryPlot plot,
                         CategoryAxis domainAxis,
                         ValueAxis rangeAxis,
                         CategoryDataset data,
                         int row,
                         int column,
                         int pass)

  Draws the bar for one item in the dataset.

  Specified by:
    `drawItem` in interface `CategoryItemRenderer`
  Overrides:
    `drawItem` in class `BarRenderer`
  Parameters:
    `g2` - the graphics device.
    `state` - the renderer state.
    `dataArea` - the plot area.
    `plot` - the plot.
    `domainAxis` - the domain (category) axis.
    `rangeAxis` - the range (value) axis.
    `data` - the data.
    `row` - the row index (zero-based).
    `column` - the column index (zero-based).
    `pass` - the pass index.

### drawHorizontalItem

    protected void drawHorizontalItem(java.awt.Graphics2D g2,
                                      CategoryItemRendererState state,
                                      java.awt.geom.Rectangle2D dataArea,
                                      CategoryPlot plot,
                                      CategoryAxis domainAxis,
                                      ValueAxis rangeAxis,
                                      CategoryDataset data,
                                      int row,
                                      int column)

  Draws the bar for a single (series, category) data item.

  Parameters:
    `g2` - the graphics device.
    `state` - the renderer state.
    `dataArea` - the data area.
    `plot` - the plot.
    `domainAxis` - the domain axis.
    `rangeAxis` - the range axis.
    `data` - the data.
    `row` - the row index (zero-based).
    `column` - the column index (zero-based).

### drawVerticalItem

    protected void drawVerticalItem(java.awt.Graphics2D g2,
                                    CategoryItemRendererState state,
                                    java.awt.geom.Rectangle2D dataArea,
                                    CategoryPlot plot,
                                    CategoryAxis domainAxis,
                                    ValueAxis rangeAxis,
                                    CategoryDataset data,
                                    int row,
                                    int column)

  Draws the bar for a single (series, category) data item.

  Parameters:
    `g2` - the graphics device.
    `state` - the renderer state.
    `dataArea` - the data area.
    `plot` - the plot.
    `domainAxis` - the domain axis.
    `rangeAxis` - the range axis.
    `data` - the data.
    `row` - the row index (zero-based).
    `column` - the column index (zero-based).

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD