Class LayeredBarRenderer

All Implemented Interfaces:
Serializable, Cloneable, CategoryItemRenderer, org.jfree.util.PublicCloneable

public class LayeredBarRenderer
extends BarRenderer
A CategoryItemRenderer that represents data using bars which are superimposed.
Author:
Arnaud Lelievre
See Also:
Serialized Form
  • Constructor Details

    • LayeredBarRenderer

      public LayeredBarRenderer()
      Default constructor.
  • Method Details

    • drawItem

      public void drawItem​(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset data, int row, int column)
      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).
    • getSeriesBarWidth

      public double getSeriesBarWidth​(int series, CategoryItemRendererState state)
      Returns the bar width for a series.
      Parameters:
      series - the series index (zero based).
      state - the renderer state.
      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).