Class StatisticalBarRenderer

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

    public class StatisticalBarRenderer
    extends BarRenderer
    implements CategoryItemRenderer, java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable
    A renderer that handles the drawing a bar plot where each bar has a mean value and a standard deviation line. The example shown here is generated by the StatisticalBarChartDemo1.java program included in the JFreeChart Demo Collection:

    StatisticalBarRendererSample.png
    See Also:
    Serialized Form
    • Method Detail

      • setErrorIndicatorPaint

        public void setErrorIndicatorPaint​(java.awt.Paint paint)
        Sets the paint used for the error indicators (if null, the item outline paint is used instead) and sends a RendererChangeEvent to all registered listeners.
        Parameters:
        paint - the paint (null permitted).
        See Also:
        getErrorIndicatorPaint()
      • getErrorIndicatorStroke

        public java.awt.Stroke getErrorIndicatorStroke()
        Returns the stroke used to draw the error indicators. If this is null, the renderer will use the item outline stroke).
        Returns:
        The stroke (possibly null).
        Since:
        1.0.8
        See Also:
        setErrorIndicatorStroke(Stroke)
      • setErrorIndicatorStroke

        public void setErrorIndicatorStroke​(java.awt.Stroke stroke)
        Sets the stroke used to draw the error indicators, and sends a RendererChangeEvent to all registered listeners. If you set this to null, the renderer will use the item outline stroke.
        Parameters:
        stroke - the stroke (null permitted).
        Since:
        1.0.8
        See Also:
        getErrorIndicatorStroke()
      • 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 with its standard deviation line range for a single (series, category) data item.
        Specified by:
        drawItem in interface CategoryItemRenderer
        Overrides:
        drawItem in class BarRenderer
        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).
        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,
                                          StatisticalCategoryDataset dataset,
                                          int visibleRow,
                                          int row,
                                          int column)
        Draws an item for a plot with a horizontal orientation.
        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 data.
        visibleRow - the visible row index.
        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,
                                        StatisticalCategoryDataset dataset,
                                        int visibleRow,
                                        int row,
                                        int column)
        Draws an item for a plot with a vertical orientation.
        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 data.
        visibleRow - the visible row index.
        row - the row index (zero-based).
        column - the column index (zero-based).
      • equals

        public boolean equals​(java.lang.Object obj)
        Tests this renderer for equality with an arbitrary object.
        Overrides:
        equals in class BarRenderer
        Parameters:
        obj - the object (null permitted).
        Returns:
        A boolean.