org.jfree.chart.renderer
Interface Renderer

All Known Subinterfaces:
CategoryItemRenderer, XYItemRenderer
All Known Implementing Classes:
AbstractCategoryItemRenderer, AbstractRenderer, AbstractXYItemRenderer, AreaXYRenderer, CandlestickRenderer, HighLowRenderer, HorizontalBarRenderer, HorizontalIntervalBarRenderer, SignalRenderer, StandardXYItemRenderer, VerticalBarRenderer, VerticalIntervalBarRenderer, VerticalStatisticalBarRenderer, VerticalXYBarRenderer, WindItemRenderer, XYBubbleRenderer, XYDotRenderer, XYStepRenderer, YIntervalRenderer

public interface Renderer

The base interface for renderers.

Author:
David Gilbert

Method Summary
 java.awt.Paint getDefaultOutlinePaint()
          Returns the default outline paint.
 java.awt.Stroke getDefaultOutlineStroke()
          Returns the default outline stroke.
 java.awt.Paint getDefaultPaint()
          Returns the default paint.
 java.awt.Shape getDefaultShape()
          Returns the default shape.
 java.awt.Stroke getDefaultStroke()
          Returns the default stroke.
 DrawingSupplier getDrawingSupplier()
          Returns the drawing supplier for the renderer.
 Plot getPlot()
          Returns the plot that the renderer has been assigned to.
 boolean isOutlinePaintTableActive()
          Returns true if the outline paint table is being used, and false otherwise.
 boolean isOutlineStrokeTableActive()
          Returns true if the outline stroke table is being used, and false otherwise.
 boolean isPaintTableActive()
          Returns true if the paint table is being used, and false otherwise.
 boolean isShapeTableActive()
          Returns true if the shape table is being used, and false otherwise.
 boolean isStrokeTableActive()
          Returns true if the stroke table is being used, and false otherwise.
 void setDefaultOutlinePaint(java.awt.Paint paint)
          Sets the default outline paint.
 void setDefaultOutlineStroke(java.awt.Stroke stroke)
          Sets the default outline stroke.
 void setDefaultPaint(java.awt.Paint paint)
          Sets the default paint.
 void setDefaultShape(java.awt.Shape shape)
          Sets the default shape.
 void setDefaultStroke(java.awt.Stroke stroke)
          Sets the default stroke.
 void setDrawingSupplier(DrawingSupplier supplier)
          Sets the drawing supplier for the renderer.
 void setOutlinePaintTableActive(boolean flag)
          Sets the flag that controls whether the outline paint table is used or not.
 void setOutlineStrokeTableActive(boolean flag)
          Sets the flag that controls whether the outline stroke table is used or not.
 void setPaintTableActive(boolean flag)
          Sets the flag that controls whether the paint table is used or not.
 void setPlot(Plot plot)
          Sets the plot that the renderer has been assigned to.
 void setSeriesPaint(int dataset, int series, java.awt.Paint paint)
          Sets the paint for a series.
 void setSeriesPaint(int series, java.awt.Paint paint)
          Sets the paint for a series in the primary dataset.
 void setSeriesStroke(int dataset, int series, java.awt.Stroke stroke)
          Sets the stroke used for a series.
 void setSeriesStroke(int series, java.awt.Stroke stroke)
          Sets the stroke used for a series (in the primary dataset).
 void setShapeTableActive(boolean flag)
          Sets the flag that controls whether the shape table is used or not.
 void setStrokeTableActive(boolean flag)
          Sets the flag that controls whether the stroke table is used or not.
 

Method Detail

getPlot

public Plot getPlot()
Returns the plot that the renderer has been assigned to.

Returns:
the plot.

setPlot

public void setPlot(Plot plot)
Sets the plot that the renderer has been assigned to.

You shouldn't need to call this method yourself, the plot will do it for you when you assign the renderer to the plot.

Parameters:
plot - the plot.

getDrawingSupplier

public DrawingSupplier getDrawingSupplier()
Returns the drawing supplier for the renderer.

Returns:
The drawing supplier.

setDrawingSupplier

public void setDrawingSupplier(DrawingSupplier supplier)
Sets the drawing supplier for the renderer. The drawing supplier is responsible for supplying a limitless (possibly repeating) sequence of Paint, Stroke and Shape objects that the renderer can use to populate its tables. The supplier can be shared among multiple renderers.

Parameters:
supplier - the new supplier.

getDefaultPaint

public java.awt.Paint getDefaultPaint()
Returns the default paint.

Returns:
The default paint.

setDefaultPaint

public void setDefaultPaint(java.awt.Paint paint)
Sets the default paint.

In most cases, the renderer's paint table will be active and so this default value will not be used.

Parameters:
paint - the paint.

isPaintTableActive

public boolean isPaintTableActive()
Returns true if the paint table is being used, and false otherwise.

Returns:
The flag.

setPaintTableActive

public void setPaintTableActive(boolean flag)
Sets the flag that controls whether the paint table is used or not. If it is not active, the default-paint attribute will be used instead.

Parameters:
flag - the flag.

setSeriesPaint

public void setSeriesPaint(int series,
                           java.awt.Paint paint)
Sets the paint for a series in the primary dataset.

Parameters:
series - the series index (zero-based).
paint - the paint.

setSeriesPaint

public void setSeriesPaint(int dataset,
                           int series,
                           java.awt.Paint paint)
Sets the paint for a series.

Parameters:
dataset - the dataset index (zero-based).
series - the series index (zero-based).
paint - the paint.

getDefaultOutlinePaint

public java.awt.Paint getDefaultOutlinePaint()
Returns the default outline paint.

Returns:
The default outline paint.

setDefaultOutlinePaint

public void setDefaultOutlinePaint(java.awt.Paint paint)
Sets the default outline paint.

Parameters:
paint - the paint.

isOutlinePaintTableActive

public boolean isOutlinePaintTableActive()
Returns true if the outline paint table is being used, and false otherwise.

Returns:
The flag.

setOutlinePaintTableActive

public void setOutlinePaintTableActive(boolean flag)
Sets the flag that controls whether the outline paint table is used or not. If it is not active, the default-outline-paint attribute will be used instead.

Parameters:
flag - the flag.

getDefaultStroke

public java.awt.Stroke getDefaultStroke()
Returns the default stroke.

Returns:
The default stroke.

setDefaultStroke

public void setDefaultStroke(java.awt.Stroke stroke)
Sets the default stroke.

Parameters:
stroke - the stroke.

isStrokeTableActive

public boolean isStrokeTableActive()
Returns true if the stroke table is being used, and false otherwise.

Returns:
The flag.

setStrokeTableActive

public void setStrokeTableActive(boolean flag)
Sets the flag that controls whether the stroke table is used or not. If it is not active, the default-stroke attribute will be used instead.

Parameters:
flag - the flag.

getDefaultOutlineStroke

public java.awt.Stroke getDefaultOutlineStroke()
Returns the default outline stroke.

Returns:
The default outline stroke.

setDefaultOutlineStroke

public void setDefaultOutlineStroke(java.awt.Stroke stroke)
Sets the default outline stroke.

Parameters:
stroke - the default outline stroke.

setSeriesStroke

public void setSeriesStroke(int series,
                            java.awt.Stroke stroke)
Sets the stroke used for a series (in the primary dataset).

Parameters:
series - the series.
stroke - the stroke.

setSeriesStroke

public void setSeriesStroke(int dataset,
                            int series,
                            java.awt.Stroke stroke)
Sets the stroke used for a series.

Parameters:
dataset - the dataset index (zero-based).
series - the series index (zero-based).
stroke - the stroke.

isOutlineStrokeTableActive

public boolean isOutlineStrokeTableActive()
Returns true if the outline stroke table is being used, and false otherwise.

Returns:
The flag.

setOutlineStrokeTableActive

public void setOutlineStrokeTableActive(boolean flag)
Sets the flag that controls whether the outline stroke table is used or not. If it is not active, the default-outline-stroke attribute will be used instead.

Parameters:
flag - the flag.

getDefaultShape

public java.awt.Shape getDefaultShape()
Returns the default shape.

Returns:
The default shape.

setDefaultShape

public void setDefaultShape(java.awt.Shape shape)
Sets the default shape.

Parameters:
shape - the shape.

isShapeTableActive

public boolean isShapeTableActive()
Returns true if the shape table is being used, and false otherwise.

Returns:
The flag.

setShapeTableActive

public void setShapeTableActive(boolean flag)
Sets the flag that controls whether the shape table is used or not. If it is not active, the default-shape attribute will be used instead.

Parameters:
flag - the flag.