Save This Page
Home » jcommon-1.0.13 » org.jfree » chart » renderer » category » [javadoc | source]
org.jfree.chart.renderer.category
public class: BarRenderer [javadoc | source]
java.lang.Object
   org.jfree.chart.renderer.AbstractRenderer
      org.jfree.chart.renderer.category.AbstractCategoryItemRenderer
         org.jfree.chart.renderer.category.BarRenderer

All Implemented Interfaces:
    PublicCloneable, Cloneable, Serializable, CategoryItemRenderer

Direct Known Subclasses:
    StackedBarRenderer, IntervalBarRenderer, WaterfallBarRenderer, StackedBarRenderer3D, LayeredBarRenderer, GroupedStackedBarRenderer, StatisticalBarRenderer, GanttRenderer, BarRenderer3D

A CategoryItemRenderer that draws individual data items as bars.
Field Summary
public static final  double DEFAULT_ITEM_MARGIN    The default item margin percentage. 
public static final  double BAR_OUTLINE_WIDTH_THRESHOLD    Constant that controls the minimum width before a bar has an outline drawn. 
Fields inherited from org.jfree.chart.renderer.AbstractRenderer:
ZERO,  DEFAULT_PAINT,  DEFAULT_OUTLINE_PAINT,  DEFAULT_STROKE,  DEFAULT_OUTLINE_STROKE,  DEFAULT_SHAPE,  DEFAULT_VALUE_LABEL_FONT,  DEFAULT_VALUE_LABEL_PAINT
Constructor:
 public BarRenderer() 
Method from org.jfree.chart.renderer.category.BarRenderer Summary:
calculateBarL0L1,   calculateBarW0,   calculateBarWidth,   calculateSeriesWidth,   drawItem,   drawItemLabel,   equals,   findRangeBounds,   getBase,   getGradientPaintTransformer,   getIncludeBaseInRange,   getItemMargin,   getLegendItem,   getLowerClip,   getMaximumBarWidth,   getMinimumBarLength,   getNegativeItemLabelPositionFallback,   getPositiveItemLabelPositionFallback,   getUpperClip,   initialise,   isDrawBarOutline,   setBase,   setDrawBarOutline,   setGradientPaintTransformer,   setIncludeBaseInRange,   setItemMargin,   setMaximumBarWidth,   setMinimumBarLength,   setNegativeItemLabelPositionFallback,   setPositiveItemLabelPositionFallback
Methods from org.jfree.chart.renderer.category.AbstractCategoryItemRenderer:
addItemEntity,   calculateDomainMarkerTextAnchorPoint,   calculateRangeMarkerTextAnchorPoint,   clone,   createState,   drawBackground,   drawDomainGridline,   drawDomainMarker,   drawItemLabel,   drawOutline,   drawRangeGridline,   drawRangeMarker,   equals,   findRangeBounds,   getBaseItemLabelGenerator,   getBaseItemURLGenerator,   getBaseToolTipGenerator,   getColumnCount,   getDomainAxis,   getDrawingSupplier,   getItemLabelGenerator,   getItemURLGenerator,   getLegendItem,   getLegendItemLabelGenerator,   getLegendItemToolTipGenerator,   getLegendItemURLGenerator,   getLegendItems,   getPassCount,   getPlot,   getRangeAxis,   getRowCount,   getSeriesItemLabelGenerator,   getSeriesItemURLGenerator,   getSeriesToolTipGenerator,   getToolTipGenerator,   getToolTipGenerator,   hashCode,   initialise,   setBaseItemLabelGenerator,   setBaseItemURLGenerator,   setBaseToolTipGenerator,   setItemLabelGenerator,   setItemURLGenerator,   setLegendItemLabelGenerator,   setLegendItemToolTipGenerator,   setLegendItemURLGenerator,   setPlot,   setSeriesItemLabelGenerator,   setSeriesItemURLGenerator,   setSeriesToolTipGenerator,   setToolTipGenerator
Methods from org.jfree.chart.renderer.AbstractRenderer:
addChangeListener,   calculateLabelAnchorPoint,   clone,   equals,   fireChangeEvent,   getAutoPopulateSeriesFillPaint,   getAutoPopulateSeriesOutlinePaint,   getAutoPopulateSeriesOutlineStroke,   getAutoPopulateSeriesPaint,   getAutoPopulateSeriesShape,   getAutoPopulateSeriesStroke,   getBaseCreateEntities,   getBaseFillPaint,   getBaseItemLabelFont,   getBaseItemLabelPaint,   getBaseItemLabelsVisible,   getBaseNegativeItemLabelPosition,   getBaseOutlinePaint,   getBaseOutlineStroke,   getBasePaint,   getBasePositiveItemLabelPosition,   getBaseSeriesVisible,   getBaseSeriesVisibleInLegend,   getBaseShape,   getBaseStroke,   getCreateEntities,   getDrawingSupplier,   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,   hashCode,   isItemLabelVisible,   isSeriesItemLabelsVisible,   isSeriesVisible,   isSeriesVisibleInLegend,   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,   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 from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.chart.renderer.category.BarRenderer Detail:
 protected double[] calculateBarL0L1(double value) 
    Calculates the coordinates for the length of a single bar.
 protected double calculateBarW0(CategoryPlot plot,
    PlotOrientation orientation,
    Rectangle2D dataArea,
    CategoryAxis domainAxis,
    CategoryItemRendererState state,
    int row,
    int column) 
    Calculates the coordinate of the first "side" of a bar. This will be the minimum x-coordinate for a vertical bar, and the minimum y-coordinate for a horizontal bar.
 protected  void calculateBarWidth(CategoryPlot plot,
    Rectangle2D dataArea,
    int rendererIndex,
    CategoryItemRendererState state) 
    Calculates the bar width and stores it in the renderer state.
 protected double calculateSeriesWidth(double space,
    CategoryAxis axis,
    int categories,
    int series) 
    Calculates the available space for each series.
 public  void drawItem(Graphics2D g2,
    CategoryItemRendererState state,
    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 drawItemLabel(Graphics2D g2,
    CategoryDataset data,
    int row,
    int column,
    CategoryPlot plot,
    CategoryItemLabelGenerator generator,
    Rectangle2D bar,
    boolean negative) 
    Draws an item label. This method is overridden so that the bar can be used to calculate the label anchor point.
 public boolean equals(Object obj) 
    Tests this instance for equality with an arbitrary object.
 public Range findRangeBounds(CategoryDataset dataset) 
    Returns the range of values the renderer requires to display all the items from the specified dataset. This takes into account the range of values in the dataset, plus the flag that determines whether or not the base value for the bars should be included in the range.
 public double getBase() 
    Returns the base value for the bars. The default value is 0.0.
 public GradientPaintTransformer getGradientPaintTransformer() 
    Returns the gradient paint transformer (an object used to transform gradient paint objects to fit each bar).
 public boolean getIncludeBaseInRange() 
 public double getItemMargin() 
    Returns the item margin as a percentage of the available space for all bars.
 public LegendItem getLegendItem(int datasetIndex,
    int series) 
    Returns a legend item for a series.
 public double getLowerClip() 
    Returns the lower clip value. This value is recalculated in the initialise() method.
 public double getMaximumBarWidth() 
    Returns the maximum bar width, as a percentage of the available drawing space.
 public double getMinimumBarLength() 
    Returns the minimum bar length (in Java2D units). The default value is 0.0.
 public ItemLabelPosition getNegativeItemLabelPositionFallback() 
    Returns the fallback position for negative item labels that don't fit within a bar.
 public ItemLabelPosition getPositiveItemLabelPositionFallback() 
    Returns the fallback position for positive item labels that don't fit within a bar.
 public double getUpperClip() 
    Returns the upper clip value. This value is recalculated in the initialise() method.
 public CategoryItemRendererState initialise(Graphics2D g2,
    Rectangle2D dataArea,
    CategoryPlot plot,
    int rendererIndex,
    PlotRenderingInfo info) 
    Initialises the renderer and returns a state object that will be passed to subsequent calls to the drawItem method. This method gets called once at the start of the process of drawing a chart.
 public boolean isDrawBarOutline() 
    Returns a flag that controls whether or not bar outlines are drawn.
 public  void setBase(double base) 
 public  void setDrawBarOutline(boolean draw) 
    Sets the flag that controls whether or not bar outlines are drawn and sends a RendererChangeEvent to all registered listeners.
 public  void setGradientPaintTransformer(GradientPaintTransformer transformer) 
    Sets the gradient paint transformer and sends a RendererChangeEvent to all registered listeners.
 public  void setIncludeBaseInRange(boolean include) 
 public  void setItemMargin(double percent) 
    Sets the item margin and sends a RendererChangeEvent to all registered listeners. The value is expressed as a percentage of the available width for plotting all the bars, with the resulting amount to be distributed between all the bars evenly.
 public  void setMaximumBarWidth(double percent) 
    Sets the maximum bar width, which is specified as a percentage of the available space for all bars, and sends a RendererChangeEvent to all registered listeners.
 public  void setMinimumBarLength(double min) 
    Sets the minimum bar length and sends a RendererChangeEvent to all registered listeners. The minimum bar length is specified in Java2D units, and can be used to prevent bars that represent very small data values from disappearing when drawn on the screen. Typically you would set this to (say) 0.5 or 1.0 Java 2D units. Use this attribute with caution, however, because setting it to a non-zero value will artificially increase the length of bars representing small values, which may misrepresent your data.
 public  void setNegativeItemLabelPositionFallback(ItemLabelPosition position) 
    Sets the fallback position for negative item labels that don't fit within a bar, and sends a RendererChangeEvent to all registered listeners.
 public  void setPositiveItemLabelPositionFallback(ItemLabelPosition position) 
    Sets the fallback position for positive item labels that don't fit within a bar, and sends a RendererChangeEvent to all registered listeners.