Package org.jfree.chart.plot
Class PlotRenderingInfo
java.lang.Object
org.jfree.chart.plot.PlotRenderingInfo
- All Implemented Interfaces:
Serializable,Cloneable
public class PlotRenderingInfo extends Object implements Cloneable, Serializable
Stores information about the dimensions of a plot and its subplots.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description PlotRenderingInfo(ChartRenderingInfo owner)Creates a new instance. -
Method Summary
Modifier and Type Method Description voidaddSubplotInfo(PlotRenderingInfo info)Adds the info for a subplot.Objectclone()Returns a clone of this object.booleanequals(Object obj)Tests this instance for equality against an arbitrary object.Rectangle2DgetDataArea()Returns the plot's data area (in Java2D space).ChartRenderingInfogetOwner()Returns the owner (as specified in the constructor).Rectangle2DgetPlotArea()Returns the plot area (in Java2D space).intgetSubplotCount()Returns the number of subplots (possibly zero).intgetSubplotIndex(Point2D source)Returns the index of the subplot that contains the specified (x, y) point (the "source" point).PlotRenderingInfogetSubplotInfo(int index)Returns the info for a subplot.voidsetDataArea(Rectangle2D area)Sets the data area.voidsetPlotArea(Rectangle2D area)Sets the plot area.
-
Constructor Details
-
PlotRenderingInfo
Creates a new instance.- Parameters:
owner- the owner (nullpermitted).
-
-
Method Details
-
getOwner
Returns the owner (as specified in the constructor).- Returns:
- The owner (possibly
null).
-
getPlotArea
Returns the plot area (in Java2D space).- Returns:
- The plot area (possibly
null). - See Also:
setPlotArea(Rectangle2D)
-
setPlotArea
Sets the plot area.- Parameters:
area- the plot area (in Java2D space,nullpermitted but discouraged)- See Also:
getPlotArea()
-
getDataArea
Returns the plot's data area (in Java2D space).- Returns:
- The data area (possibly
null). - See Also:
setDataArea(Rectangle2D)
-
setDataArea
Sets the data area.- Parameters:
area- the data area (in Java2D space,nullpermitted but discouraged).- See Also:
getDataArea()
-
getSubplotCount
Returns the number of subplots (possibly zero).- Returns:
- The subplot count.
-
addSubplotInfo
Adds the info for a subplot.- Parameters:
info- the subplot info.- See Also:
getSubplotInfo(int)
-
getSubplotInfo
Returns the info for a subplot.- Parameters:
index- the subplot index.- Returns:
- The info.
- See Also:
addSubplotInfo(PlotRenderingInfo)
-
getSubplotIndex
Returns the index of the subplot that contains the specified (x, y) point (the "source" point). The source point will usually come from a mouse click on aChartPanel, and this method is then used to determine the subplot that contains the source point.- Parameters:
source- the source point (in Java2D space,nullnot permitted).- Returns:
- The subplot index (or -1 if no subplot contains
source).
-
equals
Tests this instance for equality against an arbitrary object. -
clone
Returns a clone of this object.- Overrides:
clonein classObject- Returns:
- A clone.
- Throws:
CloneNotSupportedException- if there is a problem cloning.
-