Package org.jfree.chart.entity
Class JFreeChartEntity
- java.lang.Object
-
- org.jfree.chart.entity.ChartEntity
-
- org.jfree.chart.entity.JFreeChartEntity
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,PublicCloneable
public class JFreeChartEntity extends ChartEntity
A class that captures information about an entire chart.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private JFreeChart
chart
The chart.private static long
serialVersionUID
For serialization.
-
Constructor Summary
Constructors Constructor Description JFreeChartEntity(java.awt.Shape area, JFreeChart chart)
Creates a new chart entity.JFreeChartEntity(java.awt.Shape area, JFreeChart chart, java.lang.String toolTipText)
Creates a new chart entity.JFreeChartEntity(java.awt.Shape area, JFreeChart chart, java.lang.String toolTipText, java.lang.String urlText)
Creates a new chart entity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canEqual(java.lang.Object other)
Ensures symmetry between super/subclass implementations of equals.java.lang.Object
clone()
Returns a clone of the entity.boolean
equals(java.lang.Object obj)
Tests the entity for equality with an arbitrary object.JFreeChart
getChart()
Returns the chart that occupies the entity area.int
hashCode()
Returns a hash code for this instance.private void
readObject(java.io.ObjectInputStream stream)
Provides serialization support.java.lang.String
toString()
Returns a string representation of the chart entity, useful for debugging.private void
writeObject(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
-
chart
private JFreeChart chart
The chart.
-
-
Constructor Detail
-
JFreeChartEntity
public JFreeChartEntity(java.awt.Shape area, JFreeChart chart)
Creates a new chart entity.- Parameters:
area
- the area (null
not permitted).chart
- the chart (null
not permitted).
-
JFreeChartEntity
public JFreeChartEntity(java.awt.Shape area, JFreeChart chart, java.lang.String toolTipText)
Creates a new chart entity.- Parameters:
area
- the area (null
not permitted).chart
- the chart (null
not permitted).toolTipText
- the tool tip text (null
permitted).
-
JFreeChartEntity
public JFreeChartEntity(java.awt.Shape area, JFreeChart chart, java.lang.String toolTipText, java.lang.String urlText)
Creates a new chart entity.- Parameters:
area
- the area (null
not permitted).chart
- the chart (null
not permitted).toolTipText
- the tool tip text (null
permitted).urlText
- the URL text for HTML image maps (null
permitted).
-
-
Method Detail
-
getChart
public JFreeChart getChart()
Returns the chart that occupies the entity area.- Returns:
- The chart (never
null
).
-
toString
public java.lang.String toString()
Returns a string representation of the chart entity, useful for debugging.- Overrides:
toString
in classChartEntity
- Returns:
- A string.
-
equals
public boolean equals(java.lang.Object obj)
Tests the entity for equality with an arbitrary object.- Overrides:
equals
in classChartEntity
- Parameters:
obj
- the object to test against (null
permitted).- 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:
canEqual
in classChartEntity
- Parameters:
other
- Object- Returns:
- true ONLY if the parameter is THIS class type
-
hashCode
public int hashCode()
Description copied from class:ChartEntity
Returns a hash code for this instance.- Overrides:
hashCode
in classChartEntity
- Returns:
- A hash code.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Returns a clone of the entity.- Specified by:
clone
in interfacePublicCloneable
- Overrides:
clone
in 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.IOException
Provides 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.ClassNotFoundException
Provides 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.
-
-