Class GanttRenderer

All Implemented Interfaces:
Serializable, Cloneable, CategoryItemRenderer, org.jfree.util.PublicCloneable

public class GanttRenderer
extends IntervalBarRenderer
A renderer for simple Gantt charts.
See Also:
Serialized Form
  • Constructor Details

    • GanttRenderer

      public GanttRenderer()
      Creates a new renderer.
  • Method Details

    • getCompletePaint

      public Paint getCompletePaint()
      Returns the paint used to show the percentage complete.
      Returns:
      the paint (never null.
    • setCompletePaint

      public void setCompletePaint​(Paint paint)
      Sets the paint used to show the percentage complete and sends a RendererChangeEvent to all registered listeners.
      Parameters:
      paint - the paint (null not permitted).
    • getIncompletePaint

      public Paint getIncompletePaint()
      Returns the paint used to show the percentage incomplete.
      Returns:
      the paint (never null).
    • setIncompletePaint

      public void setIncompletePaint​(Paint paint)
      Sets the paint used to show the percentage incomplete and sends a RendererChangeEvent to all registered listeners.
      Parameters:
      paint - the paint (null not permitted).
    • getStartPercent

      public double getStartPercent()
      Returns the position of the start of the progress indicator, as a percentage of the bar width.
      Returns:
      The start percent.
    • setStartPercent

      public void setStartPercent​(double percent)
      Sets the position of the start of the progress indicator, as a percentage of the bar width.
      Parameters:
      percent - the percent.
    • getEndPercent

      public double getEndPercent()
      Returns the position of the end of the progress indicator, as a percentage of the bar width.
      Returns:
      The end percent.
    • setEndPercent

      public void setEndPercent​(double percent)
      Sets the position of the end of the progress indicator, as a percentage of the bar width.
      Parameters:
      percent - the percent.
    • drawItem

      public void drawItem​(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column)
      Draws the bar for a single (series, category) data item.
      Specified by:
      drawItem in interface CategoryItemRenderer
      Overrides:
      drawItem in class IntervalBarRenderer
      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).