## org.jfree.chart.renderer.category
Class GanttRenderer

    java.lang.Object
      org.jfree.chart.renderer.AbstractRenderer
          org.jfree.chart.renderer.category.AbstractCategoryItemRenderer
              org.jfree.chart.renderer.category.BarRenderer
                  org.jfree.chart.renderer.category.IntervalBarRenderer
                      org.jfree.chart.renderer.category.GanttRenderer

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, LegendItemSource, CategoryItemRenderer, org.jfree.util.PublicCloneable

    public class GanttRenderer

extends IntervalBarRenderer
implements java.io.Serializable

A renderer for simple Gantt charts. The example shown here is generated by the `GanttDemo1.java` program included in the JFreeChart Demo Collection:

See Also:
  Serialized Form

Field Summary

Fields inherited from class org.jfree.chart.renderer.category.BarRenderer
`BAR_OUTLINE_WIDTH_THRESHOLD, DEFAULT_ITEM_MARGIN`

Fields inherited from class org.jfree.chart.renderer.AbstractRenderer
`DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, DEFAULT_PAINT, DEFAULT_SHAPE, DEFAULT_STROKE, DEFAULT_VALUE_LABEL_FONT, DEFAULT_VALUE_LABEL_PAINT, ZERO`

Constructor Summary
`GanttRenderer()` Creates a new renderer.

Method Summary
`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.
`protected void` `drawTask(java.awt.Graphics2D g2, CategoryItemRendererState state, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, GanttCategoryDataset dataset, int row, int column)` Draws a single task.
`protected void` `drawTasks(java.awt.Graphics2D g2, CategoryItemRendererState state, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, GanttCategoryDataset dataset, int row, int column)` Draws the tasks/subtasks for one item.
`boolean` `equals(java.lang.Object obj)` Tests this renderer for equality with an arbitrary object.
`java.awt.Paint` `getCompletePaint()` Returns the paint used to show the percentage complete.
`double` `getEndPercent()` Returns the position of the end of the progress indicator, as a percentage of the bar width.
`java.awt.Paint` `getIncompletePaint()` Returns the paint used to show the percentage incomplete.
`double` `getItemMiddle(java.lang.Comparable rowKey, java.lang.Comparable columnKey, CategoryDataset dataset, CategoryAxis axis, java.awt.geom.Rectangle2D area, org.jfree.ui.RectangleEdge edge)` Returns the Java2D coordinate for the middle of the specified data item.
`double` `getStartPercent()` Returns the position of the start of the progress indicator, as a percentage of the bar width.
`void` `setCompletePaint(java.awt.Paint paint)` Sets the paint used to show the percentage complete and sends a `RendererChangeEvent` to all registered listeners.
`void` `setEndPercent(double percent)` Sets the position of the end of the progress indicator, as a percentage of the bar width, and sends a `RendererChangeEvent` to all registered listeners.
`void` `setIncompletePaint(java.awt.Paint paint)` Sets the paint used to show the percentage incomplete and sends a `RendererChangeEvent` to all registered listeners.
`void` `setStartPercent(double percent)` Sets the position of the start of the progress indicator, as a percentage of the bar width, and sends a `RendererChangeEvent` to all registered listeners.

Methods inherited from class org.jfree.chart.renderer.category.IntervalBarRenderer
`drawInterval, findRangeBounds`

Methods inherited from class org.jfree.chart.renderer.category.BarRenderer

`calculateBarL0L1, calculateBarW0, calculateBarWidth, calculateSeriesWidth, drawItemLabel, findRangeBounds, getBarPainter, getBase, getDefaultBarPainter, getDefaultShadowsVisible, getGradientPaintTransformer, getIncludeBaseInRange, getItemMargin, getLegendItem, getLowerClip, getMaximumBarWidth, getMinimumBarLength, getNegativeItemLabelPositionFallback, getPositiveItemLabelPositionFallback, getShadowPaint, getShadowsVisible, getShadowXOffset, getShadowYOffset, getUpperClip, initialise, isDrawBarOutline, setBarPainter, setBase, setDefaultBarPainter, setDefaultShadowsVisible, setDrawBarOutline, setGradientPaintTransformer, setIncludeBaseInRange, setItemMargin, setMaximumBarWidth, setMinimumBarLength, setNegativeItemLabelPositionFallback, setPositiveItemLabelPositionFallback, setShadowPaint, setShadowVisible, setShadowXOffset, setShadowYOffset`

Methods inherited from class org.jfree.chart.renderer.category.AbstractCategoryItemRenderer

`addEntity, addItemEntity, calculateDomainMarkerTextAnchorPoint, calculateRangeMarkerTextAnchorPoint, clone, createState, drawBackground, drawDomainGridline, drawDomainMarker, drawItemLabel, drawOutline, drawRangeGridline, drawRangeLine, drawRangeMarker, getBaseItemLabelGenerator, getBaseItemURLGenerator, getBaseToolTipGenerator, getColumnCount, getDomainAxis, getDrawingSupplier, getItemLabelGenerator, getItemURLGenerator, getLegendItemLabelGenerator, getLegendItems, getLegendItemToolTipGenerator, getLegendItemURLGenerator, getPassCount, getPlot, getRangeAxis, getRowCount, getSeriesItemLabelGenerator, getSeriesItemURLGenerator, getSeriesToolTipGenerator, getToolTipGenerator, getToolTipGenerator, hashCode, setBaseItemLabelGenerator, setBaseItemURLGenerator, setBaseToolTipGenerator, setItemLabelGenerator, setItemURLGenerator, setLegendItemLabelGenerator, setLegendItemToolTipGenerator, setLegendItemURLGenerator, setPlot, setSeriesItemLabelGenerator, setSeriesItemURLGenerator, setSeriesToolTipGenerator, setToolTipGenerator, updateCrosshairValues`

Methods inherited from class org.jfree.chart.renderer.AbstractRenderer

`addChangeListener, calculateLabelAnchorPoint, clearSeriesPaints, clearSeriesStrokes, fireChangeEvent, getAutoPopulateSeriesFillPaint, getAutoPopulateSeriesOutlinePaint, getAutoPopulateSeriesOutlineStroke, getAutoPopulateSeriesPaint, getAutoPopulateSeriesShape, getAutoPopulateSeriesStroke, getBaseCreateEntities, getBaseFillPaint, getBaseItemLabelFont, getBaseItemLabelPaint, getBaseItemLabelsVisible, getBaseLegendShape, getBaseLegendTextFont, getBaseLegendTextPaint, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseSeriesVisible, getBaseSeriesVisibleInLegend, getBaseShape, getBaseStroke, getCreateEntities, getDataBoundsIncludesVisibleSeriesOnly, getDefaultEntityRadius, getItemCreateEntity, getItemFillPaint, getItemLabelAnchorOffset, getItemLabelFont, getItemLabelFont, getItemLabelPaint, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemVisible, getLegendShape, getLegendTextFont, getLegendTextPaint, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getSeriesCreateEntities, getSeriesFillPaint, getSeriesItemLabelFont, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesVisible, getSeriesVisible, getSeriesVisibleInLegend, getSeriesVisibleInLegend, getTreatLegendShapeAsLine, hasListener, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, lookupLegendShape, lookupLegendTextFont, lookupLegendTextPaint, lookupSeriesFillPaint, lookupSeriesOutlinePaint, lookupSeriesOutlineStroke, lookupSeriesPaint, lookupSeriesShape, lookupSeriesStroke, notifyListeners, removeChangeListener, setAutoPopulateSeriesFillPaint, setAutoPopulateSeriesOutlinePaint, setAutoPopulateSeriesOutlineStroke, setAutoPopulateSeriesPaint, setAutoPopulateSeriesShape, setAutoPopulateSeriesStroke, setBaseCreateEntities, setBaseCreateEntities, setBaseFillPaint, setBaseFillPaint, setBaseItemLabelFont, setBaseItemLabelFont, setBaseItemLabelPaint, setBaseItemLabelPaint, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseLegendShape, setBaseLegendTextFont, setBaseLegendTextPaint, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlinePaint, setBaseOutlineStroke, setBaseOutlineStroke, setBasePaint, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseSeriesVisible, setBaseSeriesVisible, setBaseSeriesVisibleInLegend, setBaseSeriesVisibleInLegend, setBaseShape, setBaseShape, setBaseStroke, setBaseStroke, setCreateEntities, setCreateEntities, setDataBoundsIncludesVisibleSeriesOnly, setDefaultEntityRadius, setFillPaint, setFillPaint, setItemLabelAnchorOffset, setItemLabelFont, setItemLabelFont, setItemLabelPaint, setItemLabelPaint, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, setLegendShape, setLegendTextFont, setLegendTextPaint, setNegativeItemLabelPosition, setNegativeItemLabelPosition, setOutlinePaint, setOutlinePaint, setOutlineStroke, setOutlineStroke, setPaint, setPaint, setPositiveItemLabelPosition, setPositiveItemLabelPosition, setSeriesCreateEntities, setSeriesCreateEntities, setSeriesFillPaint, setSeriesFillPaint, setSeriesItemLabelFont, setSeriesItemLabelFont, setSeriesItemLabelPaint, setSeriesItemLabelPaint, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesNegativeItemLabelPosition, setSeriesNegativeItemLabelPosition, setSeriesOutlinePaint, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesOutlineStroke, setSeriesPaint, setSeriesPaint, setSeriesPositiveItemLabelPosition, setSeriesPositiveItemLabelPosition, setSeriesShape, setSeriesShape, setSeriesStroke, setSeriesStroke, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setShape, setShape, setStroke, setStroke, setTreatLegendShapeAsLine`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.jfree.util.PublicCloneable
`clone`

Methods inherited from interface org.jfree.chart.renderer.category.CategoryItemRenderer

`addChangeListener, getBaseItemLabelFont, getBaseItemLabelPaint, getBaseItemLabelsVisible, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseSeriesVisible, getBaseSeriesVisibleInLegend, getBaseShape, getBaseStroke, getItemLabelFont, getItemLabelFont, getItemLabelPaint, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemVisible, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getSeriesItemLabelFont, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesVisible, getSeriesVisible, getSeriesVisibleInLegend, getSeriesVisibleInLegend, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, removeChangeListener, setBaseItemLabelFont, setBaseItemLabelPaint, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlineStroke, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseSeriesVisible, setBaseSeriesVisible, setBaseSeriesVisibleInLegend, setBaseSeriesVisibleInLegend, setBaseShape, setBaseStroke, setItemLabelFont, setItemLabelPaint, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, setNegativeItemLabelPosition, setNegativeItemLabelPosition, setOutlinePaint, setOutlineStroke, setPaint, setPositiveItemLabelPosition, setPositiveItemLabelPosition, setSeriesItemLabelFont, setSeriesItemLabelPaint, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesNegativeItemLabelPosition, setSeriesNegativeItemLabelPosition, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesPaint, setSeriesPositiveItemLabelPosition, setSeriesPositiveItemLabelPosition, setSeriesShape, setSeriesStroke, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setShape, setStroke`

Constructor Detail

### GanttRenderer

    public GanttRenderer()

  Creates a new renderer.

Method Detail

### getCompletePaint

    public java.awt.Paint getCompletePaint()

  Returns the paint used to show the percentage complete.

  Returns:
    The paint (never `null`.
  See Also:
    `setCompletePaint(Paint)`

### setCompletePaint

    public void setCompletePaint(java.awt.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).
  See Also:
    `getCompletePaint()`

### getIncompletePaint

    public java.awt.Paint getIncompletePaint()

  Returns the paint used to show the percentage incomplete.

  Returns:
    The paint (never `null`).
  See Also:
    `setCompletePaint(Paint)`

### setIncompletePaint

    public void setIncompletePaint(java.awt.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).
  See Also:
    `getIncompletePaint()`

### 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.
  See Also:
    `setStartPercent(double)`

### setStartPercent

    public void setStartPercent(double percent)

  Sets the position of the start of the progress indicator, as a percentage of the bar width, and sends a `RendererChangeEvent` to all registered listeners.

  Parameters:
    `percent` - the percent.
  See Also:
    `getStartPercent()`

### 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.
  See Also:
    `setEndPercent(double)`

### setEndPercent

    public void setEndPercent(double percent)

  Sets the position of the end of the progress indicator, as a percentage of the bar width, and sends a `RendererChangeEvent` to all registered listeners.

  Parameters:
    `percent` - the percent.
  See Also:
    `getEndPercent()`

### 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 `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).
    `pass` - the pass index.

### drawTasks

    protected void drawTasks(java.awt.Graphics2D g2,
                             CategoryItemRendererState state,
                             java.awt.geom.Rectangle2D dataArea,
                             CategoryPlot plot,
                             CategoryAxis domainAxis,
                             ValueAxis rangeAxis,
                             GanttCategoryDataset dataset,
                             int row,
                             int column)

  Draws the tasks/subtasks for one item.

  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).

### drawTask

    protected void drawTask(java.awt.Graphics2D g2,
                            CategoryItemRendererState state,
                            java.awt.geom.Rectangle2D dataArea,
                            CategoryPlot plot,
                            CategoryAxis domainAxis,
                            ValueAxis rangeAxis,
                            GanttCategoryDataset dataset,
                            int row,
                            int column)

  Draws a single task.

  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).

### getItemMiddle

    public double getItemMiddle(java.lang.Comparable rowKey,
                                java.lang.Comparable columnKey,
                                CategoryDataset dataset,
                                CategoryAxis axis,
                                java.awt.geom.Rectangle2D area,
                                org.jfree.ui.RectangleEdge edge)

  Returns the Java2D coordinate for the middle of the specified data item.

  Specified by:
    `getItemMiddle` in interface `CategoryItemRenderer`
  Overrides:
    `getItemMiddle` in class `AbstractCategoryItemRenderer`
  Parameters:
    `rowKey` - the row key.
    `columnKey` - the column key.
    `dataset` - the dataset.
    `axis` - the axis.
    `area` - the drawing area.
    `edge` - the edge along which the axis lies.
  Returns:
    The Java2D coordinate.
  Since:
    1.0.11

### equals

    public boolean equals(java.lang.Object obj)

  Tests this renderer for equality with an arbitrary object.

  Overrides:
    `equals` in class `IntervalBarRenderer`
  Parameters:
    `obj` - the object (`null` permitted).
  Returns:
    A boolean.