Class MinMaxCategoryRenderer

All Implemented Interfaces:
Serializable, Cloneable, CategoryItemRenderer

public class MinMaxCategoryRenderer
extends AbstractCategoryItemRenderer
Renderer for drawing min max plot. This renderer draws all the series under the same category in the same x position using objectIcon and a line from the maximum value to the minimum value.

For use with the CategoryPlot class.

Author:
Tomer Peretz
See Also:
Serialized Form
  • Constructor Details

    • MinMaxCategoryRenderer

      public MinMaxCategoryRenderer()
      Default constructor.
  • Method Details

    • drawItem

      public void drawItem​(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column)
      Draw a single data item.
      Parameters:
      g2 - the graphics device.
      state - the renderer state.
      dataArea - the area in which the data is drawn.
      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).
    • setDrawLines

      public void setDrawLines​(boolean drawLines)
      Sets whether or not lines are drawn between category points.
      Parameters:
      drawLines - if true, then line will be drawn between sequenced categories.
    • isDrawLines

      public boolean isDrawLines()
      Gets whether or not lines are drawn between category points.
      Returns:
      boolean true if line will be drawn between sequenced categories, otherwise false.
    • setGroupPaint

      public void setGroupPaint​(Paint groupPaint)
      Sets the paint of the line between the minimum value and the maximum value.
      Parameters:
      groupPaint - the new paint.
    • getGroupPaint

      public Paint getGroupPaint()
      Gets the paint of the line between the minimum value and the maximum value.
      Returns:
      the paint.
    • setGroupStroke

      public void setGroupStroke​(Stroke groupStroke)
      Sets the stroke of the line between the minimum value and the maximum value.
      Parameters:
      groupStroke - The new stroke
    • getGroupStroke

      public Stroke getGroupStroke()
      Gets the stroke of the line between the minimum value and the maximum value.
      Returns:
      Stroke The current stroke.
    • setObjectIcon

      public void setObjectIcon​(Icon objectIcon)
      Sets the icon used to indicate the values.
      Parameters:
      objectIcon - the icon.
    • getObjectIcon

      public Icon getObjectIcon()
      Gets the icon used to indicate the values.
      Returns:
      the icon.
    • setMaxIcon

      public void setMaxIcon​(Icon maxIcon)
      Sets the icon used to indicate the maximum value.
      Parameters:
      maxIcon - the max icon.
    • getMaxIcone

      public Icon getMaxIcone()
      Gets the icon used to indicate the maximum value.
      Returns:
      the icon
    • setMinIcon

      public void setMinIcon​(Icon minIcon)
      Sets the icon used to indicate the minimum value.
      Parameters:
      minIcon - the min icon.
    • getMinIcon

      public Icon getMinIcon()
      Gets the icon used to indicate the minimum value.
      Returns:
      Icon