Class IntervalBarRenderer

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, LegendItemSource, CategoryItemRenderer, PublicCloneable
    Direct Known Subclasses:
    GanttRenderer

    public class IntervalBarRenderer
    extends BarRenderer
    A renderer that handles the drawing of bars for a bar plot where each bar has a high and low value. This renderer is for use with the CategoryPlot class. The example shown here is generated by the IntervalBarChartDemo1.java program included in the JFreeChart Demo Collection:

    IntervalBarRendererSample.png
    See Also:
    Serialized Form
    • Field Detail

      • serialVersionUID

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

      • IntervalBarRenderer

        public IntervalBarRenderer()
        Constructs a new renderer.
    • Method Detail

      • drawItem

        public void drawItem​(java.awt.Graphics2D g2,
                             CategoryItemRendererState state,
                             java.awt.geom.Rectangle2D dataArea,
                             CategoryPlot plot,
                             CategoryAxis domainAxis,
                             ValueAxis rangeAxis,
                             CategoryDataset dataset,
                             int row,
                             int column,
                             int pass)
        Draws the bar 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.
        dataset - the dataset.
        row - the row index (zero-based).
        column - the column index (zero-based).
        pass - the pass index.
      • drawInterval

        protected void drawInterval​(java.awt.Graphics2D g2,
                                    CategoryItemRendererState state,
                                    java.awt.geom.Rectangle2D dataArea,
                                    CategoryPlot plot,
                                    CategoryAxis domainAxis,
                                    ValueAxis rangeAxis,
                                    IntervalCategoryDataset dataset,
                                    int row,
                                    int column)
        Draws a single interval.
        Parameters:
        g2 - the graphics device.
        state - the renderer state.
        dataArea - the data plot area.
        plot - the plot.
        domainAxis - the domain axis.
        rangeAxis - the range axis.
        dataset - the data.
        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.