- java.lang.Object
-
- org.jfree.chart.ChartRenderingInfo
-
- All Implemented Interfaces:
Serializable,Cloneable
public class ChartRenderingInfo extends Object implements Cloneable, Serializable
A structure for storing rendering information from one call to the JFreeChart.draw() method.An instance of the
JFreeChartclass can draw itself within an arbitrary rectangle on anyGraphics2D. It is assumed that client code will sometimes render the same chart in more than one view, so theJFreeChartinstance does not retain any information about its rendered dimensions. This information can be useful sometimes, so you have the option to collect the information at each call toJFreeChart.draw(), by passing an instance of thisChartRenderingInfoclass.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ChartRenderingInfo()Constructs a new ChartRenderingInfo structure that can be used to collect information about the dimensions of a rendered chart.ChartRenderingInfo(EntityCollection entities)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears the information recorded by this object.Objectclone()Returns a clone of this object.booleanequals(Object obj)Tests this object for equality with an arbitrary object.Rectangle2DgetChartArea()Returns the area in which the chart was drawn.EntityCollectiongetEntityCollection()Returns the collection of entities maintained by this instance.PlotRenderingInfogetPlotInfo()Returns the rendering info for the chart's plot.inthashCode()voidsetChartArea(Rectangle2D area)Sets the area in which the chart was drawn.voidsetEntityCollection(EntityCollection entities)Sets the entity collection.
-
-
-
Constructor Detail
-
ChartRenderingInfo
public ChartRenderingInfo()
Constructs a new ChartRenderingInfo structure that can be used to collect information about the dimensions of a rendered chart.
-
ChartRenderingInfo
public ChartRenderingInfo(EntityCollection entities)
Constructs a new instance. If an entity collection is supplied, it will be populated with information about the entities in a chart. If it isnull, no entity information (including tool tips) will be collected.- Parameters:
entities- an entity collection (nullpermitted).
-
-
Method Detail
-
getChartArea
public Rectangle2D getChartArea()
Returns the area in which the chart was drawn.- Returns:
- The area in which the chart was drawn.
- See Also:
setChartArea(Rectangle2D)
-
setChartArea
public void setChartArea(Rectangle2D area)
Sets the area in which the chart was drawn.- Parameters:
area- the chart area.- See Also:
getChartArea()
-
getEntityCollection
public EntityCollection getEntityCollection()
Returns the collection of entities maintained by this instance.- Returns:
- The entity collection (possibly
null). - See Also:
setEntityCollection(EntityCollection)
-
setEntityCollection
public void setEntityCollection(EntityCollection entities)
Sets the entity collection.- Parameters:
entities- the entity collection (nullpermitted).- See Also:
getEntityCollection()
-
clear
public void clear()
Clears the information recorded by this object.
-
getPlotInfo
public PlotRenderingInfo getPlotInfo()
Returns the rendering info for the chart's plot.- Returns:
- The rendering info for the plot.
-
clone
public Object clone() throws CloneNotSupportedException
Returns a clone of this object.- Overrides:
clonein classObject- Returns:
- A clone.
- Throws:
CloneNotSupportedException- if the object cannot be cloned.
-
-