Package org.jfree.chart.renderer
Class DefaultPolarItemRenderer
java.lang.Object
org.jfree.chart.renderer.AbstractRenderer
org.jfree.chart.renderer.DefaultPolarItemRenderer
- All Implemented Interfaces:
Serializable,Cloneable,PolarItemRenderer
A renderer that can be used with the
PolarPlot class.- See Also:
-
Field Summary
Fields inherited from class org.jfree.chart.renderer.AbstractRenderer
DEFAULT_ITEM_LABEL_INSETS, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, DEFAULT_PAINT, DEFAULT_SHAPE, DEFAULT_STROKE, DEFAULT_VALUE_LABEL_FONT, DEFAULT_VALUE_LABEL_PAINT, ZERO -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of DefaultPolarItemRenderer -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddEntity(EntityCollection entities, Shape area, XYDataset dataset, int series, int item, double entityX, double entityY) Adds an entity to the collection.clone()Returns a clone of the renderer.voiddrawAngularGridLines(Graphics2D g2, PolarPlot plot, List ticks, Rectangle2D dataArea) Draw the angular gridlines - the spokes.voiddrawRadialGridLines(Graphics2D g2, PolarPlot plot, ValueAxis radialAxis, List ticks, Rectangle2D dataArea) Draw the radial gridlines - the rings.voiddrawSeries(Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info, PolarPlot plot, XYDataset dataset, int seriesIndex) Plots the data for a given series.booleanTests this renderer for equality with an arbitrary object.Returns the default tool tip generator.booleanReturnstrueif first and last point of a series will be connected,falseotherwise.Returns the drawing supplier from the plot.booleanReturnstrueif the renderer will draw an outline around a filled polygon,falseotherwise.Get the composite that is used for filling.getLegendItem(int series) Return the legend for the given series.Returns the legend item tool tip generator.Returns the legend item URL generator.Returns the shape used to represent a line in the legend.getPlot()Return the plot associated with this renderer.getSeriesToolTipGenerator(int series) Returns the tool tip generator for the specified series.booleanReturnstrueif a shape will be drawn for every item, orfalseif not.getToolTipGenerator(int series, int item) Returns the tooltip generator for the specified series and item.Returns the URL generator.booleanReturnstrueif the renderer should use the fill paint setting to fill shapes, andfalseif it should just use the regular paint.booleanisSeriesFilled(int series) Returnstrueif the renderer should fill the specified series, andfalseotherwise.voidsetBaseToolTipGenerator(XYToolTipGenerator generator) Sets the default tool tip generator and sends aRendererChangeEventto all registered listeners.voidsetConnectFirstAndLastPoint(boolean connect) Set the flag that controls whether the first and last point of a series will be connected or not and sends aRendererChangeEventto all registered listeners.voidsetDrawOutlineWhenFilled(boolean drawOutlineWhenFilled) Set the flag that controls whether the outline around a filled polygon will be drawn or not and sends aRendererChangeEventto all registered listeners.voidsetFillComposite(Composite composite) Sets the composite which will be used for filling polygons and sends aRendererChangeEventto all registered listeners.voidSets the legend item tool tip generator and sends aRendererChangeEventto all registered listeners.voidsetLegendItemURLGenerator(XYSeriesLabelGenerator generator) Sets the legend item URL generator and sends aRendererChangeEventto all registered listeners.voidsetLegendLine(Shape line) Sets the shape used as a line in each legend item and sends aRendererChangeEventto all registered listeners.voidSet the plot associated with this renderer.voidsetSeriesFilled(int series, boolean filled) Sets a flag that controls whether or not a series is filled.voidsetSeriesToolTipGenerator(int series, XYToolTipGenerator generator) Sets the tooltip generator for the specified series.voidsetShapesVisible(boolean visible) Set the flag that controls whether a shape will be drawn for every item, or not and sends aRendererChangeEventto all registered listeners.voidsetURLGenerator(XYURLGenerator urlGenerator) Sets the URL generator.voidsetUseFillPaint(boolean flag) Sets the flag that controls whether the fill paint is used to fill shapes, and sends aRendererChangeEventto all registered listeners.Methods inherited from class org.jfree.chart.renderer.AbstractRenderer
addChangeListener, beginElementGroup, calculateLabelAnchorPoint, clearSeriesPaints, clearSeriesStrokes, endElementGroup, fireChangeEvent, getAutoPopulateSeriesFillPaint, getAutoPopulateSeriesOutlinePaint, getAutoPopulateSeriesOutlineStroke, getAutoPopulateSeriesPaint, getAutoPopulateSeriesShape, getAutoPopulateSeriesStroke, getDataBoundsIncludesVisibleSeriesOnly, getDefaultCreateEntities, getDefaultEntityRadius, getDefaultFillPaint, getDefaultItemLabelFont, getDefaultItemLabelPaint, getDefaultItemLabelsVisible, getDefaultLegendShape, getDefaultLegendTextFont, getDefaultLegendTextPaint, getDefaultNegativeItemLabelPosition, getDefaultOutlinePaint, getDefaultOutlineStroke, getDefaultPaint, getDefaultPositiveItemLabelPosition, getDefaultSeriesVisible, getDefaultSeriesVisibleInLegend, getDefaultShape, getDefaultStroke, getItemCreateEntity, getItemFillPaint, getItemLabelAnchorOffset, getItemLabelFont, getItemLabelInsets, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemVisible, getLegendShape, getLegendTextFont, getLegendTextPaint, getNegativeItemLabelPosition, getPositiveItemLabelPosition, getSeriesCreateEntities, getSeriesFillPaint, getSeriesItemLabelFont, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesVisible, getSeriesVisibleInLegend, getTreatLegendShapeAsLine, hashCode, hasListener, isComputeItemLabelContrastColor, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, lookupLegendShape, lookupLegendTextFont, lookupLegendTextPaint, lookupSeriesFillPaint, lookupSeriesOutlinePaint, lookupSeriesOutlineStroke, lookupSeriesPaint, lookupSeriesShape, lookupSeriesStroke, notifyListeners, removeChangeListener, setAutoPopulateSeriesFillPaint, setAutoPopulateSeriesOutlinePaint, setAutoPopulateSeriesOutlineStroke, setAutoPopulateSeriesPaint, setAutoPopulateSeriesShape, setAutoPopulateSeriesStroke, setComputeItemLabelContrastColor, setDataBoundsIncludesVisibleSeriesOnly, setDefaultCreateEntities, setDefaultCreateEntities, setDefaultEntityRadius, setDefaultFillPaint, setDefaultFillPaint, setDefaultItemLabelFont, setDefaultItemLabelFont, setDefaultItemLabelPaint, setDefaultItemLabelPaint, setDefaultItemLabelsVisible, setDefaultItemLabelsVisible, setDefaultLegendShape, setDefaultLegendTextFont, setDefaultLegendTextPaint, setDefaultNegativeItemLabelPosition, setDefaultNegativeItemLabelPosition, setDefaultOutlinePaint, setDefaultOutlinePaint, setDefaultOutlineStroke, setDefaultOutlineStroke, setDefaultPaint, setDefaultPaint, setDefaultPositiveItemLabelPosition, setDefaultPositiveItemLabelPosition, setDefaultSeriesVisible, setDefaultSeriesVisible, setDefaultSeriesVisibleInLegend, setDefaultSeriesVisibleInLegend, setDefaultShape, setDefaultShape, setDefaultStroke, setDefaultStroke, setItemLabelAnchorOffset, setItemLabelInsets, setLegendShape, setLegendTextFont, setLegendTextPaint, 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, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setTreatLegendShapeAsLineMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.chart.renderer.PolarItemRenderer
addChangeListener, removeChangeListener
-
Constructor Details
-
DefaultPolarItemRenderer
public DefaultPolarItemRenderer()Creates a new instance of DefaultPolarItemRenderer
-
-
Method Details
-
setPlot
Set the plot associated with this renderer.- Specified by:
setPlotin interfacePolarItemRenderer- Parameters:
plot- the plot.- See Also:
-
getPlot
Return the plot associated with this renderer.- Specified by:
getPlotin interfacePolarItemRenderer- Returns:
- The plot.
- See Also:
-
getDrawOutlineWhenFilled
Returnstrueif the renderer will draw an outline around a filled polygon,falseotherwise.- Returns:
- A boolean.
-
setDrawOutlineWhenFilled
Set the flag that controls whether the outline around a filled polygon will be drawn or not and sends aRendererChangeEventto all registered listeners.- Parameters:
drawOutlineWhenFilled- the flag.
-
getFillComposite
Get the composite that is used for filling.- Returns:
- The composite (never
null).
-
setFillComposite
Sets the composite which will be used for filling polygons and sends aRendererChangeEventto all registered listeners.- Parameters:
composite- the composite to use (nullnot permitted).
-
getShapesVisible
Returnstrueif a shape will be drawn for every item, orfalseif not.- Returns:
- A boolean.
-
setShapesVisible
Set the flag that controls whether a shape will be drawn for every item, or not and sends aRendererChangeEventto all registered listeners.- Parameters:
visible- the flag.
-
getConnectFirstAndLastPoint
Returnstrueif first and last point of a series will be connected,falseotherwise.- Returns:
- The current status of the flag.
-
setConnectFirstAndLastPoint
Set the flag that controls whether the first and last point of a series will be connected or not and sends aRendererChangeEventto all registered listeners.- Parameters:
connect- the flag.
-
getDrawingSupplier
Returns the drawing supplier from the plot.- Specified by:
getDrawingSupplierin classAbstractRenderer- Returns:
- The drawing supplier.
-
isSeriesFilled
Returnstrueif the renderer should fill the specified series, andfalseotherwise.- Parameters:
series- the series index (zero-based).- Returns:
- A boolean.
-
setSeriesFilled
Sets a flag that controls whether or not a series is filled.- Parameters:
series- the series index.filled- the flag.
-
getUseFillPaint
Returnstrueif the renderer should use the fill paint setting to fill shapes, andfalseif it should just use the regular paint.- Returns:
- A boolean.
- See Also:
-
setUseFillPaint
Sets the flag that controls whether the fill paint is used to fill shapes, and sends aRendererChangeEventto all registered listeners.- Parameters:
flag- the flag.- See Also:
-
getLegendLine
Returns the shape used to represent a line in the legend.- Returns:
- The legend line (never
null). - See Also:
-
setLegendLine
Sets the shape used as a line in each legend item and sends aRendererChangeEventto all registered listeners.- Parameters:
line- the line (nullnot permitted).- See Also:
-
addEntity
protected void addEntity(EntityCollection entities, Shape area, XYDataset dataset, int series, int item, double entityX, double entityY) Adds an entity to the collection.- Parameters:
entities- the entity collection being populated.area- the entity area (ifnulla default will be used).dataset- the dataset.series- the series.item- the item.entityX- the entity's center x-coordinate in user space (only used ifareaisnull).entityY- the entity's center y-coordinate in user space (only used ifareaisnull).
-
drawSeries
public void drawSeries(Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info, PolarPlot plot, XYDataset dataset, int seriesIndex) Plots the data for a given series.- Specified by:
drawSeriesin interfacePolarItemRenderer- Parameters:
g2- the drawing surface.dataArea- the data area.info- collects plot rendering info.plot- the plot.dataset- the dataset.seriesIndex- the series index.
-
drawAngularGridLines
Draw the angular gridlines - the spokes.- Specified by:
drawAngularGridLinesin interfacePolarItemRenderer- Parameters:
g2- the drawing surface.plot- the plot (nullnot permitted).ticks- the ticks (nullnot permitted).dataArea- the data area.
-
drawRadialGridLines
public void drawRadialGridLines(Graphics2D g2, PolarPlot plot, ValueAxis radialAxis, List ticks, Rectangle2D dataArea) Draw the radial gridlines - the rings.- Specified by:
drawRadialGridLinesin interfacePolarItemRenderer- Parameters:
g2- the drawing surface (nullnot permitted).plot- the plot (nullnot permitted).radialAxis- the radial axis (nullnot permitted).ticks- the ticks (nullnot permitted).dataArea- the data area.
-
getLegendItem
Return the legend for the given series.- Specified by:
getLegendItemin interfacePolarItemRenderer- Parameters:
series- the series index.- Returns:
- The legend item.
-
getToolTipGenerator
Returns the tooltip generator for the specified series and item.- Specified by:
getToolTipGeneratorin interfacePolarItemRenderer- Parameters:
series- the series index.item- the item index.- Returns:
- The tooltip generator (possibly
null).
-
getSeriesToolTipGenerator
Returns the tool tip generator for the specified series.- Specified by:
getSeriesToolTipGeneratorin interfacePolarItemRenderer- Parameters:
series- the series index (zero based).- Returns:
- The tooltip generator (possibly
null). - See Also:
-
setSeriesToolTipGenerator
Sets the tooltip generator for the specified series.- Specified by:
setSeriesToolTipGeneratorin interfacePolarItemRenderer- Parameters:
series- the series index.generator- the tool tip generator (nullpermitted).- See Also:
-
getBaseToolTipGenerator
Returns the default tool tip generator.- Specified by:
getBaseToolTipGeneratorin interfacePolarItemRenderer- Returns:
- The default tool tip generator (possibly
null). - See Also:
-
setBaseToolTipGenerator
Sets the default tool tip generator and sends aRendererChangeEventto all registered listeners.- Specified by:
setBaseToolTipGeneratorin interfacePolarItemRenderer- Parameters:
generator- the generator (nullpermitted).- See Also:
-
getURLGenerator
Returns the URL generator.- Specified by:
getURLGeneratorin interfacePolarItemRenderer- Returns:
- The URL generator (possibly
null).
-
setURLGenerator
Sets the URL generator.- Specified by:
setURLGeneratorin interfacePolarItemRenderer- Parameters:
urlGenerator- the generator (nullpermitted)
-
getLegendItemToolTipGenerator
Returns the legend item tool tip generator.- Returns:
- The tool tip generator (possibly
null). - See Also:
-
setLegendItemToolTipGenerator
Sets the legend item tool tip generator and sends aRendererChangeEventto all registered listeners.- Parameters:
generator- the generator (nullpermitted).- See Also:
-
getLegendItemURLGenerator
Returns the legend item URL generator.- Returns:
- The URL generator (possibly
null). - See Also:
-
setLegendItemURLGenerator
Sets the legend item URL generator and sends aRendererChangeEventto all registered listeners.- Parameters:
generator- the generator (nullpermitted).- See Also:
-
equals
Tests this renderer for equality with an arbitrary object.- Overrides:
equalsin classAbstractRenderer- Parameters:
obj- the object (nullnot permitted).- Returns:
trueif this renderer is equal toobj, andfalseotherwise.
-
clone
Returns a clone of the renderer.- Overrides:
clonein classAbstractRenderer- Returns:
- A clone.
- Throws:
CloneNotSupportedException- if the renderer cannot be cloned.
-