public class GanttRenderer extends IntervalBarRenderer implements java.io.Serializable
GanttDemo1.java program
included in the JFreeChart Demo Collection:

| Modifier and Type | Field and Description |
|---|---|
private java.awt.Paint |
completePaint
The paint for displaying the percentage complete.
|
private double |
endPercent
Controls the ending edge of the progress indicator (expressed as a
percentage of the overall bar width).
|
private java.awt.Paint |
incompletePaint
The paint for displaying the incomplete part of a task.
|
private static long |
serialVersionUID
For serialization.
|
private double |
startPercent
Controls the starting edge of the progress indicator (expressed as a
percentage of the overall bar width).
|
BAR_OUTLINE_WIDTH_THRESHOLD, DEFAULT_ITEM_MARGINDEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, DEFAULT_PAINT, DEFAULT_SHAPE, DEFAULT_STROKE, DEFAULT_VALUE_LABEL_FONT, DEFAULT_VALUE_LABEL_PAINT, ZERO| Constructor and Description |
|---|
GanttRenderer()
Creates a new renderer.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
private void |
readObject(java.io.ObjectInputStream stream)
Provides serialization support.
|
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. |
private void |
writeObject(java.io.ObjectOutputStream stream)
Provides serialization support.
|
drawInterval, findRangeBoundscalculateBarL0L1, 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, setShadowYOffsetaddEntity, 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, updateCrosshairValuesaddChangeListener, 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, setTreatLegendShapeAsLinefinalize, getClass, notify, notifyAll, toString, wait, wait, waitaddChangeListener, 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, setStrokeprivate static final long serialVersionUID
private transient java.awt.Paint completePaint
private transient java.awt.Paint incompletePaint
private double startPercent
private double endPercent
public java.awt.Paint getCompletePaint()
null.setCompletePaint(Paint)public void setCompletePaint(java.awt.Paint paint)
RendererChangeEvent to all registered listeners.paint - the paint (null not permitted).getCompletePaint()public java.awt.Paint getIncompletePaint()
null).setCompletePaint(Paint)public void setIncompletePaint(java.awt.Paint paint)
RendererChangeEvent to all registered listeners.paint - the paint (null not permitted).getIncompletePaint()public double getStartPercent()
setStartPercent(double)public void setStartPercent(double percent)
RendererChangeEvent to
all registered listeners.percent - the percent.getStartPercent()public double getEndPercent()
setEndPercent(double)public void setEndPercent(double percent)
RendererChangeEvent to all
registered listeners.percent - the percent.getEndPercent()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)
drawItem in interface CategoryItemRendererdrawItem in class IntervalBarRendererg2 - 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.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)
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).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)
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).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)
getItemMiddle in interface CategoryItemRenderergetItemMiddle in class AbstractCategoryItemRendererrowKey - 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.public boolean equals(java.lang.Object obj)
equals in class IntervalBarRendererobj - the object (null permitted).private void writeObject(java.io.ObjectOutputStream stream)
throws java.io.IOException
stream - the output stream.java.io.IOException - if there is an I/O error.private void readObject(java.io.ObjectInputStream stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
stream - the input stream.java.io.IOException - if there is an I/O error.java.lang.ClassNotFoundException - if there is a classpath problem.