org.jfree.chart
Class ChartRenderingInfo

java.lang.Object
  |
  +--org.jfree.chart.ChartRenderingInfo

public class ChartRenderingInfo
extends java.lang.Object

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.

Author:
David Gilbert

Constructor Summary
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
 void clear()
          Clears the information recorded by this object.
 java.awt.geom.Rectangle2D getChartArea()
          Returns the area in which the chart was drawn.
 java.awt.geom.Rectangle2D getDataArea()
          Returns the area in which the data was plotted.
 EntityCollection getEntityCollection()
          Returns a collection of entities.
 java.awt.geom.Rectangle2D getPlotArea()
          Returns the area in which the plot (and axes, if any) were drawn.
 void setChartArea(java.awt.geom.Rectangle2D area)
          Sets the area in which the chart was drawn.
 void setDataArea(java.awt.geom.Rectangle2D area)
          Sets the area in which the data has been plotted.
 void setEntityCollection(EntityCollection entities)
          Sets the entity collection.
 void setPlotArea(java.awt.geom.Rectangle2D area)
          Sets the area in which the plot and axes were drawn.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 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 Detail

getChartArea

public java.awt.geom.Rectangle2D getChartArea()
Returns the area in which the chart was drawn.

Returns:
the area in which the chart was drawn.

setChartArea

public void setChartArea(java.awt.geom.Rectangle2D area)
Sets the area in which the chart was drawn.

Parameters:
area - the chart area.

getPlotArea

public java.awt.geom.Rectangle2D getPlotArea()
Returns the area in which the plot (and axes, if any) were drawn.

Returns:
the plot area.

setPlotArea

public void setPlotArea(java.awt.geom.Rectangle2D area)
Sets the area in which the plot and axes were drawn.

Parameters:
area - the plot area.

getDataArea

public java.awt.geom.Rectangle2D getDataArea()
Returns the area in which the data was plotted.

Returns:
the data area.

setDataArea

public void setDataArea(java.awt.geom.Rectangle2D area)
Sets the area in which the data has been plotted.

Parameters:
area - the data area.

getEntityCollection

public EntityCollection getEntityCollection()
Returns a collection of entities.

Returns:
the entity collection.

setEntityCollection

public void setEntityCollection(EntityCollection entities)
Sets the entity collection.

Parameters:
entities - the entity collection.

clear

public void clear()
Clears the information recorded by this object.