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

All Implemented Interfaces:
    PublicCloneable, Cloneable, Serializable, CategoryItemRenderer

Direct Known Subclasses:
    ScatterRenderer, BarRenderer, StackedBarRenderer, AreaRenderer, MinMaxCategoryRenderer, IntervalBarRenderer, BoxAndWhiskerRenderer, WaterfallBarRenderer, StackedBarRenderer3D, DefaultCategoryItemRenderer, LayeredBarRenderer, LineRenderer3D, GroupedStackedBarRenderer, StatisticalLineAndShapeRenderer, LevelRenderer, LineAndShapeRenderer, StatisticalBarRenderer, CategoryStepRenderer, GanttRenderer, StackedAreaRenderer, BarRenderer3D

An abstract base class that you can use to implement a new CategoryItemRenderer . When you create a new CategoryItemRenderer you are not required to extend this class, but it makes the job easier.
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:
 protected AbstractCategoryItemRenderer() 
Method from org.jfree.chart.renderer.category.AbstractCategoryItemRenderer Summary:
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.AbstractCategoryItemRenderer Detail:
 protected  void addItemEntity(EntityCollection entities,
    CategoryDataset dataset,
    int row,
    int column,
    Shape hotspot) 
    Adds an entity with the specified hotspot.
 protected Point2D calculateDomainMarkerTextAnchorPoint(Graphics2D g2,
    PlotOrientation orientation,
    Rectangle2D dataArea,
    Rectangle2D markerArea,
    RectangleInsets markerOffset,
    LengthAdjustmentType labelOffsetType,
    RectangleAnchor anchor) 
    Calculates the (x, y) coordinates for drawing the label for a marker on the range axis.
 protected Point2D calculateRangeMarkerTextAnchorPoint(Graphics2D g2,
    PlotOrientation orientation,
    Rectangle2D dataArea,
    Rectangle2D markerArea,
    RectangleInsets markerOffset,
    LengthAdjustmentType labelOffsetType,
    RectangleAnchor anchor) 
    Calculates the (x, y) coordinates for drawing a marker label.
 public Object clone() throws CloneNotSupportedException 
    Returns an independent copy of the renderer. The plot reference is shallow copied.
 protected CategoryItemRendererState createState(PlotRenderingInfo info) 
 public  void drawBackground(Graphics2D g2,
    CategoryPlot plot,
    Rectangle2D dataArea) 
    Draws a background for the data area. The default implementation just gets the plot to draw the background, but some renderers will override this behaviour.
 public  void drawDomainGridline(Graphics2D g2,
    CategoryPlot plot,
    Rectangle2D dataArea,
    double value) 
    Draws a grid line against the domain axis.

    Note that this default implementation assumes that the horizontal axis is the domain axis. If this is not the case, you will need to override this method.

 public  void drawDomainMarker(Graphics2D g2,
    CategoryPlot plot,
    CategoryAxis axis,
    CategoryMarker marker,
    Rectangle2D dataArea) 
    Draws a marker for the domain axis.
 protected  void drawItemLabel(Graphics2D g2,
    PlotOrientation orientation,
    CategoryDataset dataset,
    int row,
    int column,
    double x,
    double y,
    boolean negative) 
    Draws an item label.
 public  void drawOutline(Graphics2D g2,
    CategoryPlot plot,
    Rectangle2D dataArea) 
    Draws an outline for the data area. The default implementation just gets the plot to draw the outline, but some renderers will override this behaviour.
 public  void drawRangeGridline(Graphics2D g2,
    CategoryPlot plot,
    ValueAxis axis,
    Rectangle2D dataArea,
    double value) 
    Draws a grid line against the range axis.
 public  void drawRangeMarker(Graphics2D g2,
    CategoryPlot plot,
    ValueAxis axis,
    Marker marker,
    Rectangle2D dataArea) 
    Draws a marker for the range axis.
 public boolean equals(Object obj) 
    Tests this renderer for equality with another object.
 public Range findRangeBounds(CategoryDataset dataset) 
    Returns the range of values the renderer requires to display all the items from the specified dataset.
 public CategoryItemLabelGenerator getBaseItemLabelGenerator() 
    Returns the base item label generator.
 public CategoryURLGenerator getBaseItemURLGenerator() 
    Returns the base item URL generator.
 public CategoryToolTipGenerator getBaseToolTipGenerator() 
    Returns the base tool tip generator (the "layer 2" generator).
 public int getColumnCount() 
 protected CategoryAxis getDomainAxis(CategoryPlot plot,
    int index) 
    Returns a domain axis for a plot.
 public DrawingSupplier getDrawingSupplier() 
    Returns the drawing supplier from the plot.
 public CategoryItemLabelGenerator getItemLabelGenerator(int row,
    int column) 
    Returns the item label generator for a data item. This implementation simply passes control to the #getSeriesItemLabelGenerator(int) method. If, for some reason, you want a different generator for individual items, you can override this method.
 public CategoryURLGenerator getItemURLGenerator(int row,
    int column) 
    Returns the URL generator for a data item. This method just calls the getSeriesItemURLGenerator method, but you can override this behaviour if you want to.
 public LegendItem getLegendItem(int datasetIndex,
    int series) 
 public CategorySeriesLabelGenerator getLegendItemLabelGenerator() 
    Returns the legend item label generator.
 public CategorySeriesLabelGenerator getLegendItemToolTipGenerator() 
    Returns the legend item tool tip generator.
 public CategorySeriesLabelGenerator getLegendItemURLGenerator() 
    Returns the legend item URL generator.
 public LegendItemCollection getLegendItems() 
    Returns a (possibly empty) collection of legend items for the series that this renderer is responsible for drawing.
 public int getPassCount() 
    Returns the number of passes through the dataset required by the renderer. This method returns 1, subclasses should override if they need more passes.
 public CategoryPlot getPlot() 
    Returns the plot that the renderer has been assigned to (where null indicates that the renderer is not currently assigned to a plot).
 protected ValueAxis getRangeAxis(CategoryPlot plot,
    int index) 
    Returns a range axis for a plot.
 public int getRowCount() 
 public CategoryItemLabelGenerator getSeriesItemLabelGenerator(int series) 
    Returns the item label generator for a series.
 public CategoryURLGenerator getSeriesItemURLGenerator(int series) 
    Returns the URL generator for a series.
 public CategoryToolTipGenerator getSeriesToolTipGenerator(int series) 
    Returns the tool tip generator for the specified series (a "layer 1" generator).
 public CategoryToolTipGenerator getToolTipGenerator() 
Deprecated! This - method should no longer be used (as of version 1.0.6). It is sufficient to rely on #getSeriesToolTipGenerator(int) and #getBaseToolTipGenerator() .

    Returns the tool tip generator that will be used for ALL items in the dataset (the "layer 0" generator).
 public CategoryToolTipGenerator getToolTipGenerator(int row,
    int column) 
    Returns the tool tip generator that should be used for the specified item. This method looks up the generator using the "three-layer" approach outlined in the general description of this interface. You can override this method if you want to return a different generator per item.
 public int hashCode() 
    Returns a hash code for the renderer.
 public CategoryItemRendererState initialise(Graphics2D g2,
    Rectangle2D dataArea,
    CategoryPlot plot,
    int rendererIndex,
    PlotRenderingInfo info) 
    Initialises the renderer and returns a state object that will be used for the remainder of the drawing process for a single chart. The state object allows for the fact that the renderer may be used simultaneously by multiple threads (each thread will work with a separate state object).
 public  void setBaseItemLabelGenerator(CategoryItemLabelGenerator generator) 
    Sets the base item label generator and sends a RendererChangeEvent to all registered listeners.
 public  void setBaseItemURLGenerator(CategoryURLGenerator generator) 
 public  void setBaseToolTipGenerator(CategoryToolTipGenerator generator) 
 public  void setItemLabelGenerator(CategoryItemLabelGenerator generator) 
Deprecated! This - method should no longer be used (as of version 1.0.6). It is sufficient to rely on #setSeriesItemLabelGenerator(int, CategoryItemLabelGenerator) and #setBaseItemLabelGenerator(CategoryItemLabelGenerator) .

    Sets the item label generator for ALL series and sends a RendererChangeEvent to all registered listeners.
 public  void setItemURLGenerator(CategoryURLGenerator generator) 
Deprecated! This - method should no longer be used (as of version 1.0.6). It is sufficient to rely on #setSeriesItemURLGenerator(int, CategoryURLGenerator) and #setBaseItemURLGenerator(CategoryURLGenerator) .

    Sets the item URL generator for ALL series and sends a RendererChangeEvent to all registered listeners.
 public  void setLegendItemLabelGenerator(CategorySeriesLabelGenerator generator) 
    Sets the legend item label generator and sends a RendererChangeEvent to all registered listeners.
 public  void setLegendItemToolTipGenerator(CategorySeriesLabelGenerator generator) 
    Sets the legend item tool tip generator and sends a RendererChangeEvent to all registered listeners.
 public  void setLegendItemURLGenerator(CategorySeriesLabelGenerator generator) 
    Sets the legend item URL generator and sends a RendererChangeEvent to all registered listeners.
 public  void setPlot(CategoryPlot plot) 
    Sets the plot that the renderer has been assigned to. This method is usually called by the CategoryPlot , in normal usage you shouldn't need to call this method directly.
 public  void setSeriesItemLabelGenerator(int series,
    CategoryItemLabelGenerator generator) 
    Sets the item label generator for a series and sends a RendererChangeEvent to all registered listeners.
 public  void setSeriesItemURLGenerator(int series,
    CategoryURLGenerator generator) 
    Sets the URL generator for a series and sends a RendererChangeEvent to all registered listeners.
 public  void setSeriesToolTipGenerator(int series,
    CategoryToolTipGenerator generator) 
    Sets the tool tip generator for a series and sends a RendererChangeEvent to all registered listeners.
 public  void setToolTipGenerator(CategoryToolTipGenerator generator) 
Deprecated! This - method should no longer be used (as of version 1.0.6). It is sufficient to rely on #setSeriesToolTipGenerator(int, CategoryToolTipGenerator) and #setBaseToolTipGenerator(CategoryToolTipGenerator) .