public class ChartEntity
extends java.lang.Object
implements java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
private java.awt.Shape |
area
The area occupied by the entity (in Java 2D space).
|
private static long |
serialVersionUID
For serialization.
|
private java.lang.String |
toolTipText
The tool tip text for the entity.
|
private java.lang.String |
urlText
The URL text for the entity.
|
| Constructor and Description |
|---|
ChartEntity(java.awt.Shape area)
Creates a new chart entity.
|
ChartEntity(java.awt.Shape area,
java.lang.String toolTipText)
Creates a new chart entity.
|
ChartEntity(java.awt.Shape area,
java.lang.String toolTipText,
java.lang.String urlText)
Creates a new entity.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
java.awt.Shape |
getArea()
Returns the area occupied by the entity (in Java 2D space).
|
java.lang.String |
getImageMapAreaTag(ToolTipTagFragmentGenerator toolTipTagFragmentGenerator,
URLTagFragmentGenerator urlTagFragmentGenerator)
Returns an HTML image map tag for this entity.
|
private java.lang.String |
getPolyCoords(java.awt.Shape shape)
Returns a string containing the coordinates for a given shape.
|
private java.lang.String |
getRectCoords(java.awt.geom.Rectangle2D rectangle)
Returns a string containing the coordinates (x1, y1, x2, y2) for a given
rectangle.
|
java.lang.String |
getShapeCoords()
Returns the shape coordinates as a string.
|
java.lang.String |
getShapeType()
Returns a string describing the entity area.
|
java.lang.String |
getToolTipText()
Returns the tool tip text for the entity.
|
java.lang.String |
getURLText()
Returns the URL text for the entity.
|
int |
hashCode()
Returns a hash code for this instance.
|
private void |
readObject(java.io.ObjectInputStream stream)
Provides serialization support.
|
void |
setArea(java.awt.Shape area)
Sets the area for the entity.
|
void |
setToolTipText(java.lang.String text)
Sets the tool tip text.
|
void |
setURLText(java.lang.String text)
Sets the URL text.
|
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.
|
private static final long serialVersionUID
private transient java.awt.Shape area
private java.lang.String toolTipText
private java.lang.String urlText
public ChartEntity(java.awt.Shape area)
area - the area (null not permitted).public ChartEntity(java.awt.Shape area,
java.lang.String toolTipText)
area - the area (null not permitted).toolTipText - the tool tip text (null permitted).public ChartEntity(java.awt.Shape area,
java.lang.String toolTipText,
java.lang.String urlText)
area - the area (null not permitted).toolTipText - the tool tip text (null permitted).urlText - the URL text for HTML image maps (null
permitted).public java.awt.Shape getArea()
null).public void setArea(java.awt.Shape area)
This class conveys information about chart entities back to a client. Setting this area doesn't change the entity (which has already been drawn).
area - the area (null not permitted).public java.lang.String getToolTipText()
null).public void setToolTipText(java.lang.String text)
text - the text (null permitted).public java.lang.String getURLText()
null).public void setURLText(java.lang.String text)
text - the text (null permitted).public java.lang.String getShapeType()
null).public java.lang.String getShapeCoords()
null).private java.lang.String getRectCoords(java.awt.geom.Rectangle2D rectangle)
rectangle - the rectangle (null not permitted).private java.lang.String getPolyCoords(java.awt.Shape shape)
shape - the shape (null not permitted).public java.lang.String getImageMapAreaTag(ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator)
XHTML 1.0 compliant.toolTipTagFragmentGenerator - a generator for the HTML fragment
that will contain the tooltip text (null not permitted
if this entity contains tooltip information).urlTagFragmentGenerator - a generator for the HTML fragment that
will contain the URL reference (null not permitted if
this entity has a URL).public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to test against (null permitted).public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface org.jfree.util.PublicCloneableclone in class java.lang.Objectjava.lang.CloneNotSupportedException - if there is a problem cloning the
entity.private void writeObject(java.io.ObjectOutputStream stream)
throws java.io.IOException
stream - the output stream.java.io.IOException - if there is an I/O error.private void readObject(java.io.ObjectInputStream stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
stream - the input stream.java.io.IOException - if there is an I/O error.java.lang.ClassNotFoundException - if there is a classpath problem.