Package org.jfree.chart.entity
Class ChartEntity
java.lang.Object
org.jfree.chart.entity.ChartEntity
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
CategoryItemEntity,ContourEntity,LegendItemEntity,PieSectionEntity,TickLabelEntity,XYItemEntity
public class ChartEntity extends Object implements Cloneable, Serializable
A class that captures information about some component of a chart (a bar,
line etc).
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description 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. -
Method Summary
Modifier and Type Method Description Objectclone()Returns a clone of the entity.booleanequals(Object obj)Tests the entity for equality with an arbitrary object.ShapegetArea()Returns the area occupied by the entity (in Java 2D space).StringgetImageMapAreaTag(ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator)Returns an HTML image map tag tag for this entity.StringgetShapeCoords()Returns the shape coordinates as a string.StringgetShapeType()Returns a string describing the entity area.StringgetToolTipText()Returns the tool tip text for the entity.StringgetURLText()Returns the URL text for the entity.voidsetArea(Shape area)Sets the area for the entity.voidsetToolTipText(String text)Sets the tool tip text.voidsetURLText(String text)Sets the URL text.
-
Constructor Details
-
ChartEntity
Creates a new chart entity.- Parameters:
area- the area (nullnot permitted).
-
ChartEntity
Creates a new chart entity.- Parameters:
area- the area (nullnot permitted).toolTipText- the tool tip text (nullpermitted).
-
ChartEntity
Creates a new entity.- Parameters:
area- the area (nullnot permitted).toolTipText- the tool tip text (nullpermitted).urlText- the URL text for HTML image maps (nullpermitted).
-
-
Method Details
-
getArea
Returns the area occupied by the entity (in Java 2D space).- Returns:
- The area (never
null).
-
setArea
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).
- Parameters:
area- the area (nullnot permitted).
-
getToolTipText
Returns the tool tip text for the entity.- Returns:
- The tool tip text (possibly
null).
-
setToolTipText
Sets the tool tip text.- Parameters:
text- the text (nullpermitted).
-
getURLText
Returns the URL text for the entity.- Returns:
- The URL text (possibly
null).
-
setURLText
Sets the URL text.- Parameters:
text- the text (nullpermitted).
-
getShapeType
Returns a string describing the entity area. This string is intended for use in an AREA tag when generating an image map.- Returns:
- The shape type (never
null).
-
getShapeCoords
Returns the shape coordinates as a string.- Returns:
- The shape coordinates (never
null).
-
getImageMapAreaTag
public String getImageMapAreaTag(ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator)Returns an HTML image map tag tag for this entity.- Parameters:
toolTipTagFragmentGenerator- the generator for tooltip fragment.urlTagFragmentGenerator- the generator for the URL fragment.- Returns:
- The HTML tag.
-
equals
Tests the entity for equality with an arbitrary object. -
clone
Returns a clone of the entity.- Returns:
- A clone.
- Throws:
CloneNotSupportedException- if there is a problem cloning the entity.
-