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:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For serialization.
      See Also:
    • owner

      private ChartRenderingInfo owner
      The owner of this info.
    • plotArea

      private transient Rectangle2D plotArea
      The plot area.
    • dataArea

      private transient Rectangle2D dataArea
      The data area.
    • subplotInfo

      private List subplotInfo
      Storage for the plot rendering info objects belonging to the subplots.
  • Constructor Details

    • PlotRenderingInfo

      public PlotRenderingInfo(ChartRenderingInfo owner)
      Creates a new instance.
      Parameters:
      owner - the owner (null permitted).
  • Method Details

    • getOwner

      public ChartRenderingInfo getOwner()
      Returns the owner (as specified in the constructor).
      Returns:
      The owner (possibly null).
    • getPlotArea

      public Rectangle2D getPlotArea()
      Returns the plot area (in Java2D space).
      Returns:
      The plot area (possibly null).
      See Also:
    • setPlotArea

      public void setPlotArea(Rectangle2D area)
      Sets the plot area.
      Parameters:
      area - the plot area (in Java2D space, null permitted but discouraged)
      See Also:
    • getDataArea

      public Rectangle2D getDataArea()
      Returns the plot's data area (in Java2D space).
      Returns:
      The data area (possibly null).
      See Also:
    • setDataArea

      public void setDataArea(Rectangle2D area)
      Sets the data area.
      Parameters:
      area - the data area (in Java2D space, null permitted but discouraged).
      See Also:
    • getSubplotCount

      public int getSubplotCount()
      Returns the number of subplots (possibly zero).
      Returns:
      The subplot count.
    • addSubplotInfo

      public void addSubplotInfo(PlotRenderingInfo info)
      Adds the info for a subplot.
      Parameters:
      info - the subplot info.
      See Also:
    • getSubplotInfo

      public PlotRenderingInfo getSubplotInfo(int index)
      Returns the info for a subplot.
      Parameters:
      index - the subplot index.
      Returns:
      The info.
      See Also:
    • getSubplotIndex

      public int getSubplotIndex(Point2D source)
      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 a ChartPanel, and this method is then used to determine the subplot that contains the source point.
      Parameters:
      source - the source point (in Java2D space, null not permitted).
      Returns:
      The subplot index (or -1 if no subplot contains source).
    • equals

      public boolean equals(Object obj)
      Tests this instance for equality against an arbitrary object.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object (null permitted).
      Returns:
      A boolean.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public Object clone() throws CloneNotSupportedException
      Returns a clone of this object.
      Overrides:
      clone in class Object
      Returns:
      A clone.
      Throws:
      CloneNotSupportedException - if there is a problem cloning.
    • writeObject

      private void writeObject(ObjectOutputStream stream) throws IOException
      Provides serialization support.
      Parameters:
      stream - the output stream.
      Throws:
      IOException - if there is an I/O error.
    • readObject

      private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException
      Provides serialization support.
      Parameters:
      stream - the input stream.
      Throws:
      IOException - if there is an I/O error.
      ClassNotFoundException - if there is a classpath problem.