Package org.jfree.chart.entity
Class PlotEntity
- java.lang.Object
-
- org.jfree.chart.entity.ChartEntity
-
- org.jfree.chart.entity.PlotEntity
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,PublicCloneable
public class PlotEntity extends ChartEntity
A class that captures information about a plot.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private PlotplotThe plot.private static longserialVersionUIDFor serialization.
-
Constructor Summary
Constructors Constructor Description PlotEntity(java.awt.Shape area, Plot plot)Creates a new plot entity.PlotEntity(java.awt.Shape area, Plot plot, java.lang.String toolTipText)Creates a new plot entity.PlotEntity(java.awt.Shape area, Plot plot, java.lang.String toolTipText, java.lang.String urlText)Creates a new plot entity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanEqual(java.lang.Object other)Ensures symmetry between super/subclass implementations of equals.java.lang.Objectclone()Returns a clone of the entity.booleanequals(java.lang.Object obj)Tests the entity for equality with an arbitrary object.PlotgetPlot()Returns the plot that occupies the entity area.inthashCode()Returns a hash code for this instance.private voidreadObject(java.io.ObjectInputStream stream)Provides serialization support.java.lang.StringtoString()Returns a string representation of the plot entity, useful for debugging.private voidwriteObject(java.io.ObjectOutputStream stream)Provides serialization support.-
Methods inherited from class org.jfree.chart.entity.ChartEntity
getArea, getImageMapAreaTag, getShapeCoords, getShapeType, getToolTipText, getURLText, setArea, setToolTipText, setURLText
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
For serialization.- See Also:
- Constant Field Values
-
plot
private Plot plot
The plot.
-
-
Constructor Detail
-
PlotEntity
public PlotEntity(java.awt.Shape area, Plot plot)Creates a new plot entity.- Parameters:
area- the area (nullnot permitted).plot- the plot (nullnot permitted).
-
PlotEntity
public PlotEntity(java.awt.Shape area, Plot plot, java.lang.String toolTipText)Creates a new plot entity.- Parameters:
area- the area (nullnot permitted).plot- the plot (nullnot permitted).toolTipText- the tool tip text (nullpermitted).
-
PlotEntity
public PlotEntity(java.awt.Shape area, Plot plot, java.lang.String toolTipText, java.lang.String urlText)Creates a new plot entity.- Parameters:
area- the area (nullnot permitted).plot- the plot (nullnot permitted).toolTipText- the tool tip text (nullpermitted).urlText- the URL text for HTML image maps (nullpermitted).
-
-
Method Detail
-
getPlot
public Plot getPlot()
Returns the plot that occupies the entity area.- Returns:
- The plot (never
null).
-
toString
public java.lang.String toString()
Returns a string representation of the plot entity, useful for debugging.- Overrides:
toStringin classChartEntity- Returns:
- A string.
-
equals
public boolean equals(java.lang.Object obj)
Tests the entity for equality with an arbitrary object.- Overrides:
equalsin classChartEntity- Parameters:
obj- the object to test against (nullpermitted).- Returns:
- A boolean.
-
canEqual
public boolean canEqual(java.lang.Object other)
Ensures symmetry between super/subclass implementations of equals. For more detail, see http://jqno.nl/equalsverifier/manual/inheritance.- Overrides:
canEqualin classChartEntity- Parameters:
other- Object- Returns:
- true ONLY if the parameter is THIS class type
-
hashCode
public int hashCode()
Returns a hash code for this instance.- Overrides:
hashCodein classChartEntity- Returns:
- A hash code.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionReturns a clone of the entity.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein classChartEntity- Returns:
- A clone.
- Throws:
java.lang.CloneNotSupportedException- if there is a problem cloning the entity.
-
writeObject
private void writeObject(java.io.ObjectOutputStream stream) throws java.io.IOExceptionProvides serialization support.- Parameters:
stream- the output stream.- Throws:
java.io.IOException- if there is an I/O error.
-
readObject
private void readObject(java.io.ObjectInputStream stream) throws java.io.IOException, java.lang.ClassNotFoundExceptionProvides serialization support.- Parameters:
stream- the input stream.- Throws:
java.io.IOException- if there is an I/O error.java.lang.ClassNotFoundException- if there is a classpath problem.
-
-