|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jfree.chart.renderer.AbstractRenderer
Base class providing common services for renderers.
Field Summary | |
static java.awt.Paint |
DEFAULT_OUTLINE_PAINT
The default outline paint. |
static java.awt.Stroke |
DEFAULT_OUTLINE_STROKE
The default outline stroke. |
static java.awt.Paint |
DEFAULT_PAINT
The default paint. |
static java.awt.Shape |
DEFAULT_SHAPE
The default shape. |
static java.awt.Stroke |
DEFAULT_STROKE
The default stroke. |
Constructor Summary | |
AbstractRenderer()
Default constructor. |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a property change listener to the renderer. |
protected java.awt.Shape |
createTransformedShape(java.awt.Shape shape,
double translateX,
double translateY)
Creates and returns a translated version of a shape. |
boolean |
equals(java.lang.Object obj)
Tests this renderer for equality with another object. |
protected void |
firePropertyChanged(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Notifies registered listeners that a property of the renderer has changed. |
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. |
ChartRenderingInfo |
getInfo()
Returns the chart rendering info. |
java.awt.Paint |
getItemOutlinePaint(int dataset,
int row,
int column)
Returns the paint used to outline data items as they are drawn. |
java.awt.Stroke |
getItemOutlineStroke(int dataset,
int row,
int column)
Returns the stroke used to outline data items. |
java.awt.Paint |
getItemPaint(int dataset,
int row,
int column)
Returns the paint used to fill data items as they are drawn. |
java.awt.Shape |
getItemShape(int dataset,
int row,
int column)
Returns a shape used to represent a data item. |
java.awt.Stroke |
getItemStroke(int dataset,
int row,
int column)
Returns the stroke used to draw data items. |
Plot |
getPlot()
Returns the plot that this renderer has been assigned to. |
java.awt.Paint |
getSeriesOutlinePaint(int dataset,
int series)
Returns the color used to outline an item drawn by the renderer. |
java.awt.Stroke |
getSeriesOutlineStroke(int dataset,
int series)
Returns the stroke used to outline the items in a series. |
java.awt.Paint |
getSeriesPaint(int dataset,
int series)
Returns the color used to fill an item drawn by the renderer. |
java.awt.Shape |
getSeriesShape(int dataset,
int series)
Returns a shape used to represent the items in a series. |
java.awt.Stroke |
getSeriesStroke(int dataset,
int series)
Returns the stroke used to draw the items in a series. |
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 |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a property change listener from the renderer. |
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 |
setInfo(ChartRenderingInfo info)
Sets the chart rendering info. |
void |
setOutlinePaintTableActive(boolean active)
Sets the flag that controls whether the outline paint table is used or not. |
void |
setOutlineStrokeTableActive(boolean active)
Sets the flag that controls whether the outline stroke table is used or not. |
void |
setPaintTableActive(boolean active)
Sets the flag that controls whether the paint table is used or not. |
void |
setPlot(Plot plot)
Sets the plot that this renderer has been assigned to. |
void |
setSeriesOutlinePaint(int dataset,
int series,
java.awt.Paint paint)
Sets the paint used for a series outline. |
void |
setSeriesOutlinePaint(int series,
java.awt.Paint paint)
Sets the paint used for a series outline (in the primary dataset). |
void |
setSeriesOutlineStroke(int dataset,
int series,
java.awt.Stroke stroke)
Sets the outline stroke used for a series. |
void |
setSeriesOutlineStroke(int series,
java.awt.Stroke stroke)
Sets the outline stroke used for a series (in the primary dataset). |
void |
setSeriesPaint(int dataset,
int series,
java.awt.Paint paint)
Sets the paint used for a series. |
void |
setSeriesPaint(int series,
java.awt.Paint paint)
Sets the paint used for a series (in the primary dataset). |
void |
setSeriesShape(int dataset,
int series,
java.awt.Shape shape)
Sets the shape used for a series. |
void |
setSeriesShape(int series,
java.awt.Shape shape)
Sets the shape used 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 active)
Sets the flag that controls whether the shape table is used or not. |
void |
setStrokeTableActive(boolean active)
Sets the flag that controls whether the stroke table is used or not. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.awt.Paint DEFAULT_PAINT
public static final java.awt.Paint DEFAULT_OUTLINE_PAINT
public static final java.awt.Stroke DEFAULT_STROKE
public static final java.awt.Stroke DEFAULT_OUTLINE_STROKE
public static final java.awt.Shape DEFAULT_SHAPE
Constructor Detail |
public AbstractRenderer()
Method Detail |
public Plot getPlot()
getPlot
in interface Renderer
public void setPlot(Plot plot)
setPlot
in interface Renderer
plot
- the plot.public ChartRenderingInfo getInfo()
public void setInfo(ChartRenderingInfo info)
info
- the chart rendering info.public DrawingSupplier getDrawingSupplier()
getDrawingSupplier
in interface Renderer
public void setDrawingSupplier(DrawingSupplier supplier)
Paint
,
Stroke
and Shape
objects that the renderer can use to populate
its tables. The supplier can be shared among multiple renderers.
setDrawingSupplier
in interface Renderer
supplier
- the new supplier.public boolean isPaintTableActive()
true
if the paint table is being used, and false
otherwise.
isPaintTableActive
in interface Renderer
public void setPaintTableActive(boolean active)
setPaintTableActive
in interface Renderer
active
- the flag.public java.awt.Paint getItemPaint(int dataset, int row, int column)
The default implementation passes control to the getSeriesPaint
method.
You can override this method if you require different behaviour.
dataset
- the dataset index (zero-based).row
- the row (or series) index (zero-based).column
- the column (or category) index (zero-based).
public java.awt.Paint getSeriesPaint(int dataset, int series)
dataset
- the dataset index (zero-based).series
- the series index (zero-based).
public void setSeriesPaint(int series, java.awt.Paint paint)
setSeriesPaint
in interface Renderer
series
- the series.paint
- the paint.public void setSeriesPaint(int dataset, int series, java.awt.Paint paint)
setSeriesPaint
in interface Renderer
dataset
- the dataset index (zero-based).series
- the series index (zero-based).paint
- the paint.public java.awt.Paint getDefaultPaint()
getDefaultPaint
in interface Renderer
public void setDefaultPaint(java.awt.Paint paint)
In most cases, the renderer's paint table will be active and so this default value will not be used.
setDefaultPaint
in interface Renderer
paint
- the paint.public boolean isOutlinePaintTableActive()
true
if the outline paint table is being used, and false
otherwise.
isOutlinePaintTableActive
in interface Renderer
public void setOutlinePaintTableActive(boolean active)
setOutlinePaintTableActive
in interface Renderer
active
- the flag.public java.awt.Paint getItemOutlinePaint(int dataset, int row, int column)
The default implementation passes control to the getSeriesOutlinePaint method. You can override this method if you require different behaviour.
dataset
- the dataset index (zero-based).row
- the row (or series) index (zero-based).column
- the column (or category) index (zero-based).
public java.awt.Paint getSeriesOutlinePaint(int dataset, int series)
dataset
- the dataset (zero-based index).series
- the series (zero-based index).
public void setSeriesOutlinePaint(int series, java.awt.Paint paint)
series
- the series.paint
- the paint.public void setSeriesOutlinePaint(int dataset, int series, java.awt.Paint paint)
dataset
- the dataset index (zero-based).series
- the series index (zero-based).paint
- the paint.public java.awt.Paint getDefaultOutlinePaint()
getDefaultOutlinePaint
in interface Renderer
public void setDefaultOutlinePaint(java.awt.Paint paint)
setDefaultOutlinePaint
in interface Renderer
paint
- the paint.public boolean isStrokeTableActive()
true
if the stroke table is being used, and false
otherwise.
isStrokeTableActive
in interface Renderer
public void setStrokeTableActive(boolean active)
setStrokeTableActive
in interface Renderer
active
- the flag.public java.awt.Stroke getItemStroke(int dataset, int row, int column)
The default implementation passes control to the getSeriesStroke method. You can override this method if you require different behaviour.
dataset
- the dataset index (zero-based).row
- the row (or series) index (zero-based).column
- the column (or category) index (zero-based).
public java.awt.Stroke getSeriesStroke(int dataset, int series)
dataset
- the dataset (zero-based index).series
- the series (zero-based index).
public void setSeriesStroke(int series, java.awt.Stroke stroke)
setSeriesStroke
in interface Renderer
series
- the series.stroke
- the stroke.public void setSeriesStroke(int dataset, int series, java.awt.Stroke stroke)
setSeriesStroke
in interface Renderer
dataset
- the dataset index (zero-based).series
- the series index (zero-based).stroke
- the stroke.public java.awt.Stroke getDefaultStroke()
getDefaultStroke
in interface Renderer
public void setDefaultStroke(java.awt.Stroke stroke)
setDefaultStroke
in interface Renderer
stroke
- the stroke.public boolean isOutlineStrokeTableActive()
true
if the outline stroke table is being used, and false
otherwise.
isOutlineStrokeTableActive
in interface Renderer
public void setOutlineStrokeTableActive(boolean active)
setOutlineStrokeTableActive
in interface Renderer
active
- the flag.public java.awt.Stroke getItemOutlineStroke(int dataset, int row, int column)
The default implementation passes control to the getSeriesOutlineStroke method. You can override this method if you require different behaviour.
dataset
- the dataset index (zero-based).row
- the row (or series) index (zero-based).column
- the column (or category) index (zero-based).
public java.awt.Stroke getSeriesOutlineStroke(int dataset, int series)
dataset
- the dataset (zero-based index).series
- the series (zero-based index).
public void setSeriesOutlineStroke(int series, java.awt.Stroke stroke)
series
- the series.stroke
- the stroke.public void setSeriesOutlineStroke(int dataset, int series, java.awt.Stroke stroke)
dataset
- the dataset index (zero-based).series
- the series index (zero-based).stroke
- the stroke.public java.awt.Stroke getDefaultOutlineStroke()
getDefaultOutlineStroke
in interface Renderer
public void setDefaultOutlineStroke(java.awt.Stroke stroke)
setDefaultOutlineStroke
in interface Renderer
stroke
- the default outline stroke.protected java.awt.Shape createTransformedShape(java.awt.Shape shape, double translateX, double translateY)
shape
- the base shape.translateX
- the x translation.translateY
- the y translation.
public boolean isShapeTableActive()
true
if the shape table is being used, and false
otherwise.
isShapeTableActive
in interface Renderer
public void setShapeTableActive(boolean active)
setShapeTableActive
in interface Renderer
active
- the flag.public java.awt.Shape getItemShape(int dataset, int row, int column)
The default implementation passes control to the getSeriesShape method. You can override this method if you require different behaviour.
dataset
- the dataset index (zero-based).row
- the row (or series) index (zero-based).column
- the column (or category) index (zero-based).
public java.awt.Shape getSeriesShape(int dataset, int series)
dataset
- the dataset (zero-based index).series
- the series (zero-based index).
public void setSeriesShape(int series, java.awt.Shape shape)
series
- the series.shape
- the shape.public void setSeriesShape(int dataset, int series, java.awt.Shape shape)
dataset
- the dataset index (zero-based).series
- the series index (zero-based).shape
- the shape.public java.awt.Shape getDefaultShape()
getDefaultShape
in interface Renderer
public void setDefaultShape(java.awt.Shape shape)
setDefaultShape
in interface Renderer
shape
- the shape.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the listener.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the listener.protected void firePropertyChanged(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
propertyName
- the name of the property.oldValue
- the old value.newValue
- the new value.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object.
true
or false
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |