Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jfree.chart.renderer.category
Class GanttRenderer  view GanttRenderer download GanttRenderer.java

java.lang.Object
  extended byorg.jfree.chart.renderer.AbstractRenderer
      extended byorg.jfree.chart.renderer.category.AbstractCategoryItemRenderer
          extended byorg.jfree.chart.renderer.category.BarRenderer
              extended byorg.jfree.chart.renderer.category.IntervalBarRenderer
                  extended byorg.jfree.chart.renderer.category.GanttRenderer
All Implemented Interfaces:
CategoryItemRenderer, java.lang.Cloneable, org.jfree.chart.LegendItemSource, org.jfree.util.PublicCloneable, java.io.Serializable

public class GanttRenderer
extends IntervalBarRenderer
implements java.io.Serializable

A renderer for simple Gantt charts.


Field Summary
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).
 
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.category.AbstractCategoryItemRenderer
 
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, org.jfree.chart.plot.CategoryPlot plot, org.jfree.chart.axis.CategoryAxis domainAxis, org.jfree.chart.axis.ValueAxis rangeAxis, org.jfree.data.category.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, org.jfree.chart.plot.CategoryPlot plot, org.jfree.chart.axis.CategoryAxis domainAxis, org.jfree.chart.axis.ValueAxis rangeAxis, org.jfree.data.gantt.GanttCategoryDataset dataset, int row, int column)
          Draws a single task.
protected  void drawTasks(java.awt.Graphics2D g2, CategoryItemRendererState state, java.awt.geom.Rectangle2D dataArea, org.jfree.chart.plot.CategoryPlot plot, org.jfree.chart.axis.CategoryAxis domainAxis, org.jfree.chart.axis.ValueAxis rangeAxis, org.jfree.data.gantt.GanttCategoryDataset dataset, int row, int column)
          Draws the tasks/subtasks for one item.
 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 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 org.jfree.chart.event.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.
 void setIncompletePaint(java.awt.Paint paint)
          Sets the paint used to show the percentage incomplete and sends a org.jfree.chart.event.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.
 
Methods inherited from class org.jfree.chart.renderer.category.IntervalBarRenderer
drawInterval
 
Methods inherited from class org.jfree.chart.renderer.category.BarRenderer
calculateBarL0L1, calculateBarW0, calculateBarWidth, calculateSeriesWidth, drawItemLabel, equals, getBase, getGradientPaintTransformer, getItemMargin, getLegendItem, getLowerClip, getMaxBarWidth, getMinimumBarLength, getNegativeItemLabelPositionFallback, getPositiveItemLabelPositionFallback, getUpperClip, initialise, isDrawBarOutline, setBase, setDrawBarOutline, setGradientPaintTransformer, setItemMargin, setMaxBarWidth, setMinimumBarLength, setNegativeItemLabelPositionFallback, setPositiveItemLabelPositionFallback
 
Methods inherited from class org.jfree.chart.renderer.category.AbstractCategoryItemRenderer
clone, drawBackground, drawDomainGridline, drawDomainMarker, drawItemLabel, drawOutline, drawRangeGridline, drawRangeMarker, findRangeBounds, 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
 
Methods inherited from class org.jfree.chart.renderer.AbstractRenderer
addChangeListener, calculateLabelAnchorPoint, getBaseCreateEntities, getBaseFillPaint, getBaseItemLabelFont, getBaseItemLabelPaint, getBaseItemLabelsVisible, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseSeriesVisible, getBaseSeriesVisibleInLegend, getBaseShape, getBaseStroke, getCreateEntities, getItemCreateEntity, getItemFillPaint, getItemLabelAnchorOffset, getItemLabelFont, getItemLabelFont, getItemLabelPaint, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemVisible, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getSeriesCreateEntities, getSeriesFillPaint, getSeriesItemLabelFont, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesVisible, getSeriesVisible, getSeriesVisibleInLegend, getSeriesVisibleInLegend, hasListener, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, notifyListeners, removeChangeListener, setBaseCreateEntities, setBaseCreateEntities, setBaseFillPaint, setBaseFillPaint, setBaseItemLabelFont, setBaseItemLabelFont, setBaseItemLabelPaint, setBaseItemLabelPaint, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlinePaint, setBaseOutlineStroke, setBaseOutlineStroke, setBasePaint, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseSeriesVisible, setBaseSeriesVisible, setBaseSeriesVisibleInLegend, setBaseSeriesVisibleInLegend, setBaseShape, setBaseShape, setBaseStroke, setBaseStroke, setCreateEntities, setCreateEntities, setFillPaint, setFillPaint, setItemLabelAnchorOffset, setItemLabelFont, setItemLabelFont, setItemLabelPaint, setItemLabelPaint, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, 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
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jfree.chart.renderer.category.CategoryItemRenderer
addChangeListener, drawBackground, drawDomainGridline, drawDomainMarker, drawOutline, drawRangeGridline, drawRangeMarker, findRangeBounds, getBaseItemLabelFont, getBaseItemLabelGenerator, getBaseItemLabelPaint, getBaseItemLabelsVisible, getBaseItemURLGenerator, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseSeriesVisible, getBaseSeriesVisibleInLegend, getBaseShape, getBaseStroke, getBaseToolTipGenerator, getItemLabelFont, getItemLabelFont, getItemLabelGenerator, getItemLabelPaint, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemURLGenerator, getItemVisible, getLegendItem, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPassCount, getPlot, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getSeriesItemLabelFont, getSeriesItemLabelGenerator, getSeriesItemLabelPaint, getSeriesItemURLGenerator, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesToolTipGenerator, getSeriesVisible, getSeriesVisible, getSeriesVisibleInLegend, getSeriesVisibleInLegend, getToolTipGenerator, getToolTipGenerator, initialise, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, removeChangeListener, setBaseItemLabelFont, setBaseItemLabelGenerator, setBaseItemLabelPaint, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemURLGenerator, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlineStroke, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseSeriesVisible, setBaseSeriesVisible, setBaseSeriesVisibleInLegend, setBaseSeriesVisibleInLegend, setBaseShape, setBaseStroke, setBaseToolTipGenerator, setItemLabelFont, setItemLabelGenerator, setItemLabelPaint, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, setItemURLGenerator, setNegativeItemLabelPosition, setNegativeItemLabelPosition, setOutlinePaint, setOutlineStroke, setPaint, setPlot, setPositiveItemLabelPosition, setPositiveItemLabelPosition, setSeriesItemLabelFont, setSeriesItemLabelGenerator, setSeriesItemLabelPaint, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemURLGenerator, setSeriesNegativeItemLabelPosition, setSeriesNegativeItemLabelPosition, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesPaint, setSeriesPositiveItemLabelPosition, setSeriesPositiveItemLabelPosition, setSeriesShape, setSeriesStroke, setSeriesToolTipGenerator, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setShape, setStroke, setToolTipGenerator
 
Methods inherited from interface org.jfree.chart.LegendItemSource
getLegendItems
 
Methods inherited from interface org.jfree.util.PublicCloneable
clone
 

Field Detail

serialVersionUID

private static final long serialVersionUID
For serialization.

See Also:
Constant Field Values

completePaint

private java.awt.Paint completePaint
The paint for displaying the percentage complete.


incompletePaint

private java.awt.Paint incompletePaint
The paint for displaying the incomplete part of a task.


startPercent

private double startPercent
Controls the starting edge of the progress indicator (expressed as a percentage of the overall bar width).


endPercent

private double endPercent
Controls the ending edge of the progress indicator (expressed as a percentage of the overall bar width).

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.


setCompletePaint

public void setCompletePaint(java.awt.Paint paint)
Sets the paint used to show the percentage complete and sends a org.jfree.chart.event.RendererChangeEvent to all registered listeners.


getIncompletePaint

public java.awt.Paint getIncompletePaint()
Returns the paint used to show the percentage incomplete.


setIncompletePaint

public void setIncompletePaint(java.awt.Paint paint)
Sets the paint used to show the percentage incomplete and sends a org.jfree.chart.event.RendererChangeEvent to all registered listeners.


getStartPercent

public double getStartPercent()
Returns the position of the start of the progress indicator, as a percentage of the bar width.


setStartPercent

public void setStartPercent(double percent)
Sets the position of the start of the progress indicator, as a percentage of the bar width.


getEndPercent

public double getEndPercent()
Returns the position of the end of the progress indicator, as a percentage of the bar width.


setEndPercent

public void setEndPercent(double percent)
Sets the position of the end of the progress indicator, as a percentage of the bar width.


drawItem

public void drawItem(java.awt.Graphics2D g2,
                     CategoryItemRendererState state,
                     java.awt.geom.Rectangle2D dataArea,
                     org.jfree.chart.plot.CategoryPlot plot,
                     org.jfree.chart.axis.CategoryAxis domainAxis,
                     org.jfree.chart.axis.ValueAxis rangeAxis,
                     org.jfree.data.category.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

drawTasks

protected void drawTasks(java.awt.Graphics2D g2,
                         CategoryItemRendererState state,
                         java.awt.geom.Rectangle2D dataArea,
                         org.jfree.chart.plot.CategoryPlot plot,
                         org.jfree.chart.axis.CategoryAxis domainAxis,
                         org.jfree.chart.axis.ValueAxis rangeAxis,
                         org.jfree.data.gantt.GanttCategoryDataset dataset,
                         int row,
                         int column)
Draws the tasks/subtasks for one item.


drawTask

protected void drawTask(java.awt.Graphics2D g2,
                        CategoryItemRendererState state,
                        java.awt.geom.Rectangle2D dataArea,
                        org.jfree.chart.plot.CategoryPlot plot,
                        org.jfree.chart.axis.CategoryAxis domainAxis,
                        org.jfree.chart.axis.ValueAxis rangeAxis,
                        org.jfree.data.gantt.GanttCategoryDataset dataset,
                        int row,
                        int column)
Draws a single task.