Package org.jfree.chart
Class ChartRenderingInfo
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 JFreeChart
class can draw itself within an
arbitrary rectangle on any Graphics2D. It is assumed that client code will
sometimes render the same chart in more than one view, so the
JFreeChart
instance 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 to
JFreeChart.draw(...)
, by passing an instance of this
ChartRenderingInfo
class.
- 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 ChartRenderingInfo structure. -
Method Summary
Modifier and Type Method Description void
clear()
Clears the information recorded by this object.Object
clone()
Returns a clone of this object.boolean
equals(Object obj)
Tests this object for equality with an arbitrary object.Rectangle2D
getChartArea()
Returns the area in which the chart was drawn.EntityCollection
getEntityCollection()
Returns the collection of entities maintained by this instance.Rectangle2D
getPlotArea()
Returns the area in which the plot (and axes, if any) were drawn.PlotRenderingInfo
getPlotInfo()
Returns the rendering info for the chart's plot.void
setChartArea(Rectangle2D area)
Sets the area in which the chart was drawn.void
setEntityCollection(EntityCollection entities)
Sets the entity collection.void
setPlotArea(Rectangle2D area)
Sets the area in which the plot and axes were drawn.
-
Constructor Details
-
ChartRenderingInfo
public ChartRenderingInfo()Constructs a new ChartRenderingInfo structure that can be used to collect information about the dimensions of a rendered chart. -
ChartRenderingInfo
Constructs a new ChartRenderingInfo structure.If an entity collection is supplied, it will be populated with information about the entities in a chart. If it is null, no entity information (including tool tips) will be collected.
- Parameters:
entities
- an entity collection (null permitted).
-
-
Method Details
-
getChartArea
Returns the area in which the chart was drawn.- Returns:
- the area in which the chart was drawn.
-
setChartArea
Sets the area in which the chart was drawn.- Parameters:
area
- the chart area.
-
getPlotArea
Returns the area in which the plot (and axes, if any) were drawn.- Returns:
- the plot area.
-
setPlotArea
Sets the area in which the plot and axes were drawn.- Parameters:
area
- the plot area.
-
getEntityCollection
Returns the collection of entities maintained by this instance.- Returns:
- The entity collection (possibly
null
.
-
setEntityCollection
Sets the entity collection.- Parameters:
entities
- the entity collection (null
permitted).
-
clear
public void clear()Clears the information recorded by this object. -
getPlotInfo
Returns the rendering info for the chart's plot.- Returns:
- The rendering info for the plot.
-
equals
Tests this object for equality with an arbitrary object. -
clone
Returns a clone of this object.- Returns:
- A clone.
- Throws:
CloneNotSupportedException
- if the object cannot be cloned.
-