Class LayeredBarRenderer

    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        For serialization.
        See Also:
        Constant Field Values
      • seriesBarWidthList

        protected 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 dataset,
                                          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.
        dataset - the dataset.
        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 dataset,
                                        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.
        dataset - the dataset.
        row - the row index (zero-based).
        column - the column index (zero-based).