|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A plug-in object that is used by the CategoryPlot
class to display individual data items
from a CategoryDataset
.
This interface defines the methods that must be provided by all renderers. If you are
implementing a custom renderer, you should consider extending the
AbstractCategoryItemRenderer
class.
Method Summary | |
void |
addChangeListener(RendererChangeListener listener)
Adds a change listener. |
void |
drawBackground(java.awt.Graphics2D g2,
CategoryPlot plot,
java.awt.geom.Rectangle2D dataArea)
Draws a background for the data area. |
void |
drawDomainGridline(java.awt.Graphics2D g2,
CategoryPlot plot,
java.awt.geom.Rectangle2D dataArea,
double value)
Draws a grid line against the domain axis. |
void |
drawItem(java.awt.Graphics2D g2,
CategoryItemRendererState state,
java.awt.geom.Rectangle2D dataArea,
CategoryPlot plot,
CategoryAxis domainAxis,
ValueAxis rangeAxis,
CategoryDataset data,
int row,
int column)
Draws a single data item. |
void |
drawOutline(java.awt.Graphics2D g2,
CategoryPlot plot,
java.awt.geom.Rectangle2D dataArea)
Draws an outline for the data area. |
void |
drawRangeGridline(java.awt.Graphics2D g2,
CategoryPlot plot,
ValueAxis axis,
java.awt.geom.Rectangle2D dataArea,
double value)
Draws a grid line against the range axis. |
void |
drawRangeMarker(java.awt.Graphics2D g2,
CategoryPlot plot,
ValueAxis axis,
Marker marker,
java.awt.geom.Rectangle2D dataArea)
Draws a line (or some other marker) to indicate a particular value on the range axis. |
ItemLabelAnchor |
getBaseItemLabelAnchor()
Deprecated. Use getBaseItemLabelPosition. |
java.awt.Font |
getBaseItemLabelFont()
Returns the base item label font. |
CategoryItemLabelGenerator |
getBaseItemLabelGenerator()
Returns the base item label generator. |
org.jfree.ui.TextAnchor |
getBaseItemLabelTextAnchor()
Deprecated. Use setBaseItemLabelPosition. |
CategoryURLGenerator |
getBaseItemURLGenerator()
Returns the base item URL generator. |
java.awt.Paint |
getBaseOutlinePaint()
Returns the base outline paint. |
java.awt.Stroke |
getBaseOutlineStroke()
Returns the base outline stroke. |
java.awt.Paint |
getBasePaint()
Returns the base paint. |
java.awt.Shape |
getBaseShape()
Returns the base shape. |
java.awt.Stroke |
getBaseStroke()
Returns the base stroke. |
ItemLabelAnchor |
getItemLabelAnchor(int series,
int item)
Deprecated. Use getItemLabelPosition. |
java.awt.Font |
getItemLabelFont(int series,
int item)
Returns the item label font for an item. |
CategoryItemLabelGenerator |
getItemLabelGenerator(int series,
int item)
Returns the item label generator for an item. |
org.jfree.ui.TextAnchor |
getItemLabelTextAnchor(int series,
int item)
Deprecated. Use getItemLabelPosition. |
java.awt.Paint |
getItemOutlinePaint(int series,
int item)
Returns the outline paint for an item. |
java.awt.Stroke |
getItemOutlineStroke(int series,
int item)
Returns the outline stroke for an item. |
java.awt.Paint |
getItemPaint(int series,
int category)
Returns the paint used to fill an item. |
java.awt.Shape |
getItemShape(int series,
int item)
Returns the shape for an item. |
java.awt.Stroke |
getItemStroke(int series,
int item)
Returns the stroke for an item. |
CategoryURLGenerator |
getItemURLGenerator(int series,
int item)
Returns the URL generator for an item. |
LegendItem |
getLegendItem(int datasetIndex,
int series)
Returns a legend item for a series. |
ItemLabelPosition |
getNegativeItemLabelPosition(int row,
int column)
Returns the negative item label position. |
CategoryPlot |
getPlot()
Returns the plot that the renderer has been assigned to. |
ItemLabelPosition |
getPositiveItemLabelPosition(int row,
int column)
Returns the positive item label position. |
RangeType |
getRangeType()
Returns the range type for the renderer. |
ItemLabelAnchor |
getSeriesItemLabelAnchor(int series)
Deprecated. Use getSeriesItemLabelPosition. |
java.awt.Font |
getSeriesItemLabelFont(int series)
Deprecated. Use getSeriesItemLabelPosition. |
CategoryItemLabelGenerator |
getSeriesItemLabelGenerator(int series)
Returns the item label generator for a series. |
org.jfree.ui.TextAnchor |
getSeriesItemLabelTextAnchor(int series)
Deprecated. User getSeriesItemLabelPosition. |
CategoryURLGenerator |
getSeriesItemURLGenerator(int series)
Returns the item URL generator for a series. |
java.awt.Paint |
getSeriesOutlinePaint(int series)
Returns the outline paint for a series. |
java.awt.Stroke |
getSeriesOutlineStroke(int series)
Returns the outline stroke for a series. |
java.awt.Paint |
getSeriesPaint(int series)
Returns the paint used to fill shapes for this renderer. |
java.awt.Shape |
getSeriesShape(int series)
Returns the shape for a series. |
java.awt.Stroke |
getSeriesStroke(int series)
Returns the stroke for a series. |
CategoryItemRendererState |
initialise(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
CategoryPlot plot,
java.lang.Integer index,
PlotRenderingInfo info)
Initialises the renderer. |
void |
removeChangeListener(RendererChangeListener listener)
Removes a change listener. |
void |
setBaseItemLabelAnchor(ItemLabelAnchor anchor)
Deprecated. Use setBaseItemLabelPosition. |
void |
setBaseItemLabelFont(java.awt.Font font)
Sets the base item label font. |
void |
setBaseItemLabelGenerator(CategoryItemLabelGenerator generator)
Sets the base item label generator. |
void |
setBaseItemLabelTextAnchor(org.jfree.ui.TextAnchor anchor)
Deprecated. Use setBaseItemLabelPosition. |
void |
setBaseItemURLGenerator(CategoryURLGenerator generator)
Sets the base item URL generator. |
void |
setBaseOutlinePaint(java.awt.Paint paint)
Sets the base outline paint. |
void |
setBaseOutlineStroke(java.awt.Stroke stroke)
Sets the base outline stroke. |
void |
setBasePaint(java.awt.Paint paint)
Sets the base paint. |
void |
setBaseShape(java.awt.Shape shape)
Sets the base shape. |
void |
setBaseStroke(java.awt.Stroke stroke)
Sets the base stroke. |
void |
setItemLabelAnchor(ItemLabelAnchor anchor)
Deprecated. Use setItemLabelPosition. |
void |
setItemLabelFont(java.awt.Font font)
Sets the item label font for ALL series. |
void |
setItemLabelGenerator(CategoryItemLabelGenerator generator)
Sets the item label generator for ALL series. |
void |
setItemLabelsVisible(boolean visible)
Sets a flag that controls whether or not the item labels for ALL series are visible. |
void |
setItemLabelsVisible(java.lang.Boolean visible)
Sets a flag that controls whether or not the item labels for ALL series are visible. |
void |
setItemLabelTextAnchor(org.jfree.ui.TextAnchor anchor)
Deprecated. Use setItemLabelPosition. |
void |
setItemURLGenerator(CategoryURLGenerator generator)
Sets the item URL generator for ALL series. |
void |
setNegativeItemLabelPosition(ItemLabelPosition position)
Sets the negative item label position for ALL series. |
void |
setOutlinePaint(java.awt.Paint paint)
Sets the outline paint for ALL series (optional). |
void |
setOutlineStroke(java.awt.Stroke stroke)
Sets the outline stroke for ALL series. |
void |
setPlot(CategoryPlot plot)
Sets the plot that the renderer has been assigned to. |
void |
setPositiveItemLabelPosition(ItemLabelPosition position)
Sets the positive item label position for ALL series. |
void |
setSeriesItemLabelAnchor(int series,
ItemLabelAnchor anchor)
Deprecated. Use setSeriesItemLabelPosition. |
void |
setSeriesItemLabelFont(int series,
java.awt.Font font)
Sets the item label font for a series. |
void |
setSeriesItemLabelGenerator(int series,
CategoryItemLabelGenerator generator)
Sets the item label generator for a series. |
void |
setSeriesItemLabelTextAnchor(int series,
org.jfree.ui.TextAnchor anchor)
Deprecated. Use setSeriesItemLabelPosition. |
void |
setSeriesItemURLGenerator(int series,
CategoryURLGenerator generator)
Sets the item URL generator for a series. |
void |
setSeriesOutlinePaint(int series,
java.awt.Paint paint)
Sets the outline paint for a series in the primary dataset. |
void |
setSeriesOutlineStroke(int series,
java.awt.Stroke stroke)
Sets the outline stroke for a series in the primary dataset. |
void |
setSeriesPaint(int series,
java.awt.Paint paint)
Sets the paint for a series in the primary dataset. |
void |
setSeriesShape(int series,
java.awt.Shape shape)
Sets the shape for a series in the primary dataset. |
void |
setSeriesStroke(int series,
java.awt.Stroke stroke)
Sets the stroke for a series in the primary dataset. |
void |
setStroke(java.awt.Stroke stroke)
Sets the stroke for ALL series (optional). |
Method Detail |
public CategoryPlot getPlot()
public void setPlot(CategoryPlot plot)
You shouldn't need to call this method yourself, the plot will do it for you when you assign the renderer to the plot.
plot
- the plot.public void addChangeListener(RendererChangeListener listener)
listener
- the listener.public void removeChangeListener(RendererChangeListener listener)
listener
- the listener.public RangeType getRangeType()
Two types are recognised:
STANDARD
- data items are plotted individually, so the axis range should
extend from the smallest value to the largest value;STACKED
- data items are stacked on top of one another, so to determine
the axis range, all the items in a series need to be summed together.
public CategoryItemRendererState initialise(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, java.lang.Integer index, PlotRenderingInfo info)
g2
- the graphics device.dataArea
- the area inside the axes.plot
- the plot.index
- the secondary index (null
for primary renderer).info
- collects chart rendering information for return to caller.
public java.awt.Paint getBasePaint()
public void setBasePaint(java.awt.Paint paint)
In most cases, the renderer's paint table will be active and so this default value will not be used.
paint
- the paint.public java.awt.Paint getItemPaint(int series, int category)
series
- the series index (zero-based).category
- the category index (zero-based).
public java.awt.Paint getSeriesPaint(int series)
series
- the series (zero-based index).
public void setSeriesPaint(int series, java.awt.Paint paint)
series
- the series index (zero-based).paint
- the paint.public java.awt.Paint getBaseOutlinePaint()
public void setBaseOutlinePaint(java.awt.Paint paint)
paint
- the paint.public java.awt.Paint getItemOutlinePaint(int series, int item)
series
- the series index (zero-based).item
- the item index (zero-based).
public void setOutlinePaint(java.awt.Paint paint)
paint
- the paint (null
permitted).public java.awt.Paint getSeriesOutlinePaint(int series)
series
- the series index (zero-based).
public void setSeriesOutlinePaint(int series, java.awt.Paint paint)
series
- the series index (zero-based).paint
- the paint.public java.awt.Stroke getItemStroke(int series, int item)
series
- the series index (zero-based).item
- the item index (zero-based).
public java.awt.Stroke getSeriesStroke(int series)
series
- the series index (zero-based).
public void setStroke(java.awt.Stroke stroke)
stroke
- the stroke.public void setSeriesStroke(int series, java.awt.Stroke stroke)
series
- the series index (zero-based).stroke
- the stroke.public java.awt.Stroke getBaseStroke()
public void setBaseStroke(java.awt.Stroke stroke)
stroke
- the stroke.public java.awt.Stroke getItemOutlineStroke(int series, int item)
series
- the series index (zero-based).item
- the item index (zero-based).
public java.awt.Stroke getSeriesOutlineStroke(int series)
series
- the series index (zero-based).
public void setOutlineStroke(java.awt.Stroke stroke)
stroke
- the stroke.public void setSeriesOutlineStroke(int series, java.awt.Stroke stroke)
series
- the series index (zero-based).stroke
- the stroke.public java.awt.Stroke getBaseOutlineStroke()
public void setBaseOutlineStroke(java.awt.Stroke stroke)
stroke
- the outline stroke.public java.awt.Shape getItemShape(int series, int item)
series
- the series index (zero-based).item
- the item index (zero-based).
public java.awt.Shape getSeriesShape(int series)
series
- the series index (zero-based).
public void setSeriesShape(int series, java.awt.Shape shape)
series
- the series index (zero-based).shape
- the shape.public java.awt.Shape getBaseShape()
public void setBaseShape(java.awt.Shape shape)
shape
- the shape.public void setItemLabelsVisible(java.lang.Boolean visible)
visible
- the flag (null
permitted).public void setItemLabelsVisible(boolean visible)
visible
- the flag (null
permitted).public CategoryItemLabelGenerator getItemLabelGenerator(int series, int item)
series
- the series index (zero-based).item
- the item index (zero-based).
public CategoryItemLabelGenerator getSeriesItemLabelGenerator(int series)
series
- the series index (zero-based).
public void setItemLabelGenerator(CategoryItemLabelGenerator generator)
generator
- the generator.public void setSeriesItemLabelGenerator(int series, CategoryItemLabelGenerator generator)
series
- the series index (zero-based).generator
- the generator.public CategoryItemLabelGenerator getBaseItemLabelGenerator()
public void setBaseItemLabelGenerator(CategoryItemLabelGenerator generator)
generator
- the base item label generator.public ItemLabelAnchor getItemLabelAnchor(int series, int item)
series
- the series index (zero-based).item
- the item index (zero-based).
public ItemLabelAnchor getSeriesItemLabelAnchor(int series)
series
- the series index (zero-based).
public void setItemLabelAnchor(ItemLabelAnchor anchor)
anchor
- the anchor.public void setSeriesItemLabelAnchor(int series, ItemLabelAnchor anchor)
series
- the series index (zero-based).anchor
- the anchor.public ItemLabelAnchor getBaseItemLabelAnchor()
public void setBaseItemLabelAnchor(ItemLabelAnchor anchor)
anchor
- the base item label anchor.public org.jfree.ui.TextAnchor getItemLabelTextAnchor(int series, int item)
series
- the series index (zero-based).item
- the item index (zero-based).
public org.jfree.ui.TextAnchor getSeriesItemLabelTextAnchor(int series)
series
- the series index (zero-based).
public void setItemLabelTextAnchor(org.jfree.ui.TextAnchor anchor)
anchor
- the anchor.public void setSeriesItemLabelTextAnchor(int series, org.jfree.ui.TextAnchor anchor)
series
- the series index (zero-based).anchor
- the anchor.public org.jfree.ui.TextAnchor getBaseItemLabelTextAnchor()
public void setBaseItemLabelTextAnchor(org.jfree.ui.TextAnchor anchor)
anchor
- the item label text anchor.public java.awt.Font getItemLabelFont(int series, int item)
series
- the series index (zero-based).item
- the item index (zero-based).
public java.awt.Font getSeriesItemLabelFont(int series)
series
- the series index (zero-based).
public void setItemLabelFont(java.awt.Font font)
font
- the font.public void setSeriesItemLabelFont(int series, java.awt.Font font)
series
- the series index (zero-based).font
- the font.public java.awt.Font getBaseItemLabelFont()
public void setBaseItemLabelFont(java.awt.Font font)
font
- the item label font.public ItemLabelPosition getPositiveItemLabelPosition(int row, int column)
row
- the row.column
- the column.
public void setPositiveItemLabelPosition(ItemLabelPosition position)
position
- the position (null
permitted).public ItemLabelPosition getNegativeItemLabelPosition(int row, int column)
row
- the row index.column
- the column index.
public void setNegativeItemLabelPosition(ItemLabelPosition position)
position
- the position.public CategoryURLGenerator getItemURLGenerator(int series, int item)
series
- the series index (zero-based).item
- the item index (zero-based).
public CategoryURLGenerator getSeriesItemURLGenerator(int series)
series
- the series index (zero-based).
public void setItemURLGenerator(CategoryURLGenerator generator)
generator
- the generator.public void setSeriesItemURLGenerator(int series, CategoryURLGenerator generator)
series
- the series index (zero-based).generator
- the generator.public CategoryURLGenerator getBaseItemURLGenerator()
public void setBaseItemURLGenerator(CategoryURLGenerator generator)
generator
- the item URL generator.public LegendItem getLegendItem(int datasetIndex, int series)
datasetIndex
- the dataset index (zero-based).series
- the series (zero-based index).
public void drawBackground(java.awt.Graphics2D g2, CategoryPlot plot, java.awt.geom.Rectangle2D dataArea)
g2
- the graphics device.plot
- the plot.dataArea
- the data area.public void drawOutline(java.awt.Graphics2D g2, CategoryPlot plot, java.awt.geom.Rectangle2D dataArea)
g2
- the graphics device.plot
- the plot.dataArea
- the data area.public void drawItem(java.awt.Graphics2D g2, CategoryItemRendererState state, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset data, int row, int column)
g2
- the graphics device.state
- state information for one chart.dataArea
- the data plot area.plot
- the plot.domainAxis
- the domain axis.rangeAxis
- the range axis.data
- the data.row
- the row index (zero-based).column
- the column index (zero-based).public void drawDomainGridline(java.awt.Graphics2D g2, CategoryPlot plot, java.awt.geom.Rectangle2D dataArea, double value)
g2
- the graphics device.plot
- the plot.dataArea
- the area for plotting data (not yet adjusted for any 3D effect).value
- the value.public void drawRangeGridline(java.awt.Graphics2D g2, CategoryPlot plot, ValueAxis axis, java.awt.geom.Rectangle2D dataArea, double value)
g2
- the graphics device.plot
- the plot.axis
- the value axis.dataArea
- the area for plotting data (not yet adjusted for any 3D effect).value
- the value.public void drawRangeMarker(java.awt.Graphics2D g2, CategoryPlot plot, ValueAxis axis, Marker marker, java.awt.geom.Rectangle2D dataArea)
g2
- the graphics device.plot
- the plot.axis
- the value axis.marker
- the marker.dataArea
- the area for plotting data (not including 3D effect).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |