Class DeviationStepRenderer

All Implemented Interfaces:
Serializable, Cloneable, EventListener, AnnotationChangeListener, LegendItemSource, XYItemRenderer, PublicCloneable

public class DeviationStepRenderer
extends DeviationRenderer
A specialised subclass of the DeviationRenderer that requires an IntervalXYDataset and represents the y-interval by shading an area behind the y-values on the chart, drawing only horizontal or vertical lines (steps);
Since:
1.5.1
See Also:
Serialized Form
  • Constructor Details

    • DeviationStepRenderer

      Creates a new renderer that displays lines and shapes for the data items, as well as the shaded area for the y-interval.
    • DeviationStepRenderer

      public DeviationStepRenderer​(boolean lines, boolean shapes)
      Creates a new renderer.
      Parameters:
      lines - show lines between data items?
      shapes - show a shape for each data item?
  • Method Details

    • drawItem

      public void drawItem​(Graphics2D g2, XYItemRendererState state, Rectangle2D dataArea, PlotRenderingInfo info, XYPlot plot, ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset, int series, int item, CrosshairState crosshairState, int pass)
      Draws the visual representation of a single data item.
      Specified by:
      drawItem in interface XYItemRenderer
      Overrides:
      drawItem in class DeviationRenderer
      Parameters:
      g2 - the graphics device.
      state - the renderer state.
      dataArea - the area within which the data is being drawn.
      info - collects information about the drawing.
      plot - the plot (can be used to obtain standard color information etc).
      domainAxis - the domain axis.
      rangeAxis - the range axis.
      dataset - the dataset.
      series - the series index (zero-based).
      item - the item index (zero-based).
      crosshairState - crosshair information for the plot (null permitted).
      pass - the pass index.
    • drawPrimaryLineAsPath

      protected void drawPrimaryLineAsPath​(XYItemRendererState state, Graphics2D g2, XYPlot plot, XYDataset dataset, int pass, int series, int item, ValueAxis domainAxis, ValueAxis rangeAxis, Rectangle2D dataArea)
      Draws the item (first pass). This method draws the lines connecting the items. Instead of drawing separate lines, a GeneralPath is constructed and drawn at the end of the series painting.
      Overrides:
      drawPrimaryLineAsPath in class XYLineAndShapeRenderer
      Parameters:
      g2 - the graphics device.
      state - the renderer state.
      plot - the plot (can be used to obtain standard color information etc).
      dataset - the dataset.
      pass - the pass.
      series - the series index (zero-based).
      item - the item index (zero-based).
      domainAxis - the domain axis.
      rangeAxis - the range axis.
      dataArea - the area within which the data is being drawn.
    • equals

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