Class StatisticalBarRenderer

    • Field Detail

      • serialVersionUID

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

        private transient java.awt.Paint errorIndicatorPaint
        The paint used to show the error indicator.
      • errorIndicatorStroke

        private transient java.awt.Stroke errorIndicatorStroke
        The stroke used to draw the error indicators.
    • Constructor Detail

      • StatisticalBarRenderer

        public StatisticalBarRenderer()
        Default constructor.
    • Method Detail

      • getErrorIndicatorPaint

        public java.awt.Paint getErrorIndicatorPaint()
        Returns the paint used for the error indicators.
        Returns:
        The paint used for the error indicators (possibly null).
        See Also:
        setErrorIndicatorPaint(Paint)
      • 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).
        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).
        See Also:
        getErrorIndicatorStroke()
      • findRangeBounds

        public Range findRangeBounds​(CategoryDataset dataset)
        Returns the range of values the renderer requires to display all the items from the specified dataset. This takes into account the range between the min/max values, possibly ignoring invisible series.
        Specified by:
        findRangeBounds in interface CategoryItemRenderer
        Overrides:
        findRangeBounds in class AbstractCategoryItemRenderer
        Parameters:
        dataset - the dataset (null permitted).
        Returns:
        The range (or null if the dataset is null or empty).
      • 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.
      • writeObject

        private void writeObject​(java.io.ObjectOutputStream stream)
                          throws java.io.IOException
        Provides serialization support.
        Parameters:
        stream - the output stream.
        Throws:
        java.io.IOException - if there is an I/O error.
      • readObject

        private void readObject​(java.io.ObjectInputStream stream)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Provides serialization support.
        Parameters:
        stream - the input stream.
        Throws:
        java.io.IOException - if there is an I/O error.
        java.lang.ClassNotFoundException - if there is a classpath problem.