public class ChartRenderingInfo
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
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.
| Modifier and Type | Field and Description |
|---|---|
private java.awt.geom.Rectangle2D |
chartArea
The area in which the chart is drawn.
|
private EntityCollection |
entities
Storage for the chart entities.
|
private PlotRenderingInfo |
plotInfo
Rendering info for the chart's plot (and subplots, if any).
|
private static long |
serialVersionUID
For serialization.
|
| Constructor and 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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the information recorded by this object.
|
java.lang.Object |
clone()
Returns a clone of this object.
|
boolean |
equals(java.lang.Object obj)
Tests this object for equality with an arbitrary object.
|
java.awt.geom.Rectangle2D |
getChartArea()
Returns the area in which the chart was drawn.
|
EntityCollection |
getEntityCollection()
Returns the collection of entities maintained by this instance.
|
PlotRenderingInfo |
getPlotInfo()
Returns the rendering info for the chart's plot.
|
private void |
readObject(java.io.ObjectInputStream stream)
Provides serialization support.
|
void |
setChartArea(java.awt.geom.Rectangle2D area)
Sets the area in which the chart was drawn.
|
void |
setEntityCollection(EntityCollection entities)
Sets the entity collection.
|
private void |
writeObject(java.io.ObjectOutputStream stream)
Provides serialization support.
|
private static final long serialVersionUID
private transient java.awt.geom.Rectangle2D chartArea
private PlotRenderingInfo plotInfo
private EntityCollection entities
null to prevent the
information being collected.public ChartRenderingInfo()
public ChartRenderingInfo(EntityCollection entities)
null, no entity information (including tool tips) will
be collected.entities - an entity collection (null permitted).public java.awt.geom.Rectangle2D getChartArea()
setChartArea(Rectangle2D)public void setChartArea(java.awt.geom.Rectangle2D area)
area - the chart area.getChartArea()public EntityCollection getEntityCollection()
null).setEntityCollection(EntityCollection)public void setEntityCollection(EntityCollection entities)
entities - the entity collection (null permitted).getEntityCollection()public void clear()
public PlotRenderingInfo getPlotInfo()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to test against (null permitted).public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException - if the object cannot be cloned.private void writeObject(java.io.ObjectOutputStream stream)
throws java.io.IOException
stream - the output stream.java.io.IOException - if there is an I/O error.private void readObject(java.io.ObjectInputStream stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
stream - the input stream.java.io.IOException - if there is an I/O error.java.lang.ClassNotFoundException - if there is a classpath problem.