org.jfree.chart.entity
Class ChartEntity
java.lang.Object
org.jfree.chart.entity.ChartEntity
- Cloneable, PublicCloneable, Serializable
extends java.lang.Object
implements Cloneable, PublicCloneable, Serializable
A class that captures information about some component of a chart (a bar,
line etc).
ChartEntity(Shape area) - Creates a new chart entity.
|
ChartEntity(Shape area, String toolTipText) - Creates a new chart entity.
|
ChartEntity(Shape area, String toolTipText, String urlText) - Creates a new entity.
|
Object | clone() - Returns a clone of the entity.
|
boolean | equals(Object obj) - Tests the entity for equality with an arbitrary object.
|
Shape | getArea() - Returns the area occupied by the entity (in Java 2D space).
|
String | getImageMapAreaTag(ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator) - Returns an HTML image map tag for this entity.
|
String | getShapeCoords() - Returns the shape coordinates as a string.
|
String | getShapeType() - Returns a string describing the entity area.
|
String | getToolTipText() - Returns the tool tip text for the entity.
|
String | getURLText() - Returns the URL text for the entity.
|
void | setArea(Shape area) - Sets the area for the entity.
|
void | setToolTipText(String text) - Sets the tool tip text.
|
void | setURLText(String text) - Sets the URL text.
|
String | toString() - Returns a string representation of the chart entity, useful for
debugging.
|
ChartEntity
public ChartEntity(Shape area)
Creates a new chart entity.
area
- the area (null
not permitted).
ChartEntity
public ChartEntity(Shape area,
String toolTipText)
Creates a new chart entity.
area
- the area (null
not permitted).toolTipText
- the tool tip text (null
permitted).
ChartEntity
public ChartEntity(Shape area,
String toolTipText,
String urlText)
Creates a new entity.
area
- the area (null
not permitted).toolTipText
- the tool tip text (null
permitted).urlText
- the URL text for HTML image maps (null
permitted).
clone
public Object clone()
throws CloneNotSupportedException
Returns a clone of the entity.
equals
public boolean equals(Object obj)
Tests the entity for equality with an arbitrary object.
obj
- the object to test against (null
permitted).
getArea
public Shape getArea()
Returns the area occupied by the entity (in Java 2D space).
getImageMapAreaTag
public String getImageMapAreaTag(ToolTipTagFragmentGenerator toolTipTagFragmentGenerator,
URLTagFragmentGenerator urlTagFragmentGenerator)
Returns an HTML image map tag for this entity. The returned fragment
should be 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).
getShapeCoords
public String getShapeCoords()
Returns the shape coordinates as a string.
- The shape coordinates (never
null
).
getShapeType
public String getShapeType()
Returns a string describing the entity area. This string is intended
for use in an AREA tag when generating an image map.
- The shape type (never
null
).
getToolTipText
public String getToolTipText()
Returns the tool tip text for the entity.
- The tool tip text (possibly
null
).
getURLText
public String getURLText()
Returns the URL text for the entity.
- The URL text (possibly
null
).
setArea
public void setArea(Shape area)
Sets the area for the entity.
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).
setToolTipText
public void setToolTipText(String text)
Sets the tool tip text.
text
- the text (null
permitted).
setURLText
public void setURLText(String text)
Sets the URL text.
text
- the text (null
permitted).
toString
public String toString()
Returns a string representation of the chart entity, useful for
debugging.