Package org.jfree.chart.renderer
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
-
Field Summary
Fields inherited from class org.jfree.chart.renderer.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
Constructors Constructor Description GanttRenderer()
Creates a new renderer. -
Method Summary
Modifier and Type Method Description 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.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.Paint
getIncompletePaint()
Returns the paint used to show the percentage incomplete.double
getStartPercent()
Returns the position of the start of the progress indicator, as a percentage of the bar width.void
setCompletePaint(Paint paint)
Sets the paint used to show the percentage complete and sends aRendererChangeEvent
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.void
setIncompletePaint(Paint paint)
Sets the paint used to show the percentage incomplete and sends aRendererChangeEvent
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.Methods inherited from class org.jfree.chart.renderer.BarRenderer
equals, getGradientPaintTransformer, getItemMargin, getLowerClip, getMaxBarWidth, getMinimumBarLength, getNegativeItemLabelPositionFallback, getPositiveItemLabelPositionFallback, getUpperClip, initialise, isDrawBarOutline, setDrawBarOutline, setGradientPaintTransformer, setItemMargin, setMaxBarWidth, setMinimumBarLength, setNegativeItemLabelPositionFallback, setPositiveItemLabelPositionFallback
Methods inherited from class org.jfree.chart.renderer.AbstractCategoryItemRenderer
clone, drawBackground, drawDomainGridline, drawOutline, drawRangeGridline, drawRangeMarker, getBaseItemURLGenerator, getBaseLabelGenerator, getBaseToolTipGenerator, getColumnCount, getDrawingSupplier, getItemURLGenerator, getLabelGenerator, getLegendItem, getPlot, getRangeExtent, getRowCount, getSeriesItemURLGenerator, getSeriesLabelGenerator, getSeriesToolTipGenerator, getToolTipGenerator, getToolTipGenerator, hashCode, setBaseItemURLGenerator, setBaseLabelGenerator, setBaseToolTipGenerator, setItemURLGenerator, setLabelGenerator, setPlot, setSeriesItemURLGenerator, setSeriesLabelGenerator, setSeriesToolTipGenerator, setToolTipGenerator
Methods inherited from class org.jfree.chart.renderer.AbstractRenderer
addChangeListener, getBaseItemLabelAnchor, getBaseItemLabelAngle, getBaseItemLabelFont, getBaseItemLabelPaint, getBaseItemLabelRotationAnchor, getBaseItemLabelsVisible, getBaseItemLabelTextAnchor, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseShape, getBaseStroke, getItemLabelAnchor, getItemLabelAnchorOffset, getItemLabelAngle, getItemLabelFont, getItemLabelFont, getItemLabelPaint, getItemLabelPaint, getItemLabelRotationAnchor, getItemLabelTextAnchor, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getSeriesItemLabelAnchor, getSeriesItemLabelAngle, getSeriesItemLabelFont, getSeriesItemLabelPaint, getSeriesItemLabelRotationAnchor, getSeriesItemLabelTextAnchor, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, isItemLabelVisible, isSeriesItemLabelsVisible, notifyListeners, removeChangeListener, setBaseAngle, setBaseItemLabelAnchor, setBaseItemLabelFont, setBaseItemLabelFont, setBaseItemLabelPaint, setBaseItemLabelPaint, setBaseItemLabelRotationAnchor, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelTextAnchor, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlinePaint, setBaseOutlineStroke, setBaseOutlineStroke, setBasePaint, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseShape, setBaseShape, setBaseStroke, setBaseStroke, setItemLabelAnchor, setItemLabelAnchorOffset, setItemLabelAngle, setItemLabelFont, setItemLabelFont, setItemLabelPaint, setItemLabelPaint, setItemLabelRotationAnchor, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, setItemLabelTextAnchor, setNegativeItemLabelPosition, setNegativeItemLabelPosition, setOutlinePaint, setOutlinePaint, setOutlineStroke, setOutlineStroke, setPaint, setPaint, setPositiveItemLabelPosition, setPositiveItemLabelPosition, setSeriesAngle, setSeriesItemLabelAnchor, setSeriesItemLabelFont, setSeriesItemLabelFont, setSeriesItemLabelPaint, setSeriesItemLabelPaint, setSeriesItemLabelRotationAnchor, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelTextAnchor, setSeriesNegativeItemLabelPosition, setSeriesNegativeItemLabelPosition, setSeriesOutlinePaint, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesOutlineStroke, setSeriesPaint, setSeriesPaint, setSeriesPositiveItemLabelPosition, setSeriesPositiveItemLabelPosition, setSeriesShape, setSeriesShape, setSeriesStroke, setSeriesStroke, setShape, setShape, setStroke, setStroke
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jfree.chart.renderer.CategoryItemRenderer
addChangeListener, drawBackground, drawDomainGridline, drawOutline, drawRangeGridline, drawRangeMarker, getBaseItemLabelAnchor, getBaseItemLabelFont, getBaseItemLabelPaint, getBaseItemLabelsVisible, getBaseItemLabelTextAnchor, getBaseItemURLGenerator, getBaseLabelGenerator, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseShape, getBaseStroke, getBaseToolTipGenerator, getItemLabelAnchor, getItemLabelFont, getItemLabelFont, getItemLabelPaint, getItemLabelPaint, getItemLabelTextAnchor, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemURLGenerator, getLabelGenerator, getLegendItem, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPlot, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getRangeExtent, getSeriesItemLabelAnchor, getSeriesItemLabelFont, getSeriesItemLabelPaint, getSeriesItemLabelTextAnchor, getSeriesItemURLGenerator, getSeriesLabelGenerator, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesToolTipGenerator, getToolTipGenerator, getToolTipGenerator, initialise, isItemLabelVisible, isSeriesItemLabelsVisible, removeChangeListener, setBaseItemLabelAnchor, setBaseItemLabelFont, setBaseItemLabelPaint, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelTextAnchor, setBaseItemURLGenerator, setBaseLabelGenerator, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlineStroke, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseShape, setBaseStroke, setBaseToolTipGenerator, setItemLabelAnchor, setItemLabelFont, setItemLabelPaint, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, setItemLabelTextAnchor, setItemURLGenerator, setLabelGenerator, setNegativeItemLabelPosition, setNegativeItemLabelPosition, setOutlinePaint, setOutlineStroke, setPaint, setPlot, setPositiveItemLabelPosition, setPositiveItemLabelPosition, setSeriesItemLabelAnchor, setSeriesItemLabelFont, setSeriesItemLabelPaint, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelTextAnchor, setSeriesItemURLGenerator, setSeriesLabelGenerator, setSeriesNegativeItemLabelPosition, setSeriesNegativeItemLabelPosition, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesPaint, setSeriesPositiveItemLabelPosition, setSeriesPositiveItemLabelPosition, setSeriesShape, setSeriesStroke, setSeriesToolTipGenerator, setShape, setStroke, setToolTipGenerator
Methods inherited from interface org.jfree.util.PublicCloneable
clone
-
Constructor Details
-
GanttRenderer
public GanttRenderer()Creates a new renderer.
-
-
Method Details
-
getCompletePaint
Returns the paint used to show the percentage complete.- Returns:
- the paint (never
null
.
-
setCompletePaint
Sets the paint used to show the percentage complete and sends aRendererChangeEvent
to all registered listeners.- Parameters:
paint
- the paint (null
not permitted).
-
getIncompletePaint
Returns the paint used to show the percentage incomplete.- Returns:
- the paint (never
null
).
-
setIncompletePaint
Sets the paint used to show the percentage incomplete and sends aRendererChangeEvent
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 interfaceCategoryItemRenderer
- Overrides:
drawItem
in classIntervalBarRenderer
- 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).
-