## org.jfree.chart.entity
Class ChartEntity

    java.lang.Object
      org.jfree.chart.entity.ChartEntity

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, org.jfree.util.PublicCloneable

Direct Known Subclasses:
  CategoryItemEntity, ContourEntity, LegendItemEntity, PieSectionEntity, TickLabelEntity, XYAnnotationEntity, XYItemEntity

    public class ChartEntity

extends java.lang.Object
implements java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable

A class that captures information about some component of a chart (a bar, line etc).

See Also:
  Serialized Form

Constructor Summary
`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.

Method Summary
`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.
`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.
`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.

Methods inherited from class java.lang.Object
`finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ChartEntity

    public ChartEntity(java.awt.Shape area)

  Creates a new chart entity.

  Parameters:
    `area` - the area (`null` not permitted).

### ChartEntity

    public ChartEntity(java.awt.Shape area,
                       java.lang.String toolTipText)

  Creates a new chart entity.

  Parameters:
    `area` - the area (`null` not permitted).
    `toolTipText` - the tool tip text (`null` permitted).

### ChartEntity

    public ChartEntity(java.awt.Shape area,
                       java.lang.String toolTipText,
                       java.lang.String urlText)

  Creates a new entity.

  Parameters:
    `area` - the area (`null` not permitted).
    `toolTipText` - the tool tip text (`null` permitted).
    `urlText` - the URL text for HTML image maps (`null` permitted).

Method Detail

### getArea

    public java.awt.Shape getArea()

  Returns the area occupied by the entity (in Java 2D space).

  Returns:
    The area (never `null`).

### setArea

    public void setArea(java.awt.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).

  Parameters:
    `area` - the area (`null` not permitted).

### getToolTipText

    public java.lang.String getToolTipText()

  Returns the tool tip text for the entity.

  Returns:
    The tool tip text (possibly `null`).

### setToolTipText

    public void setToolTipText(java.lang.String text)

  Sets the tool tip text.

  Parameters:
    `text` - the text (`null` permitted).

### getURLText

    public java.lang.String getURLText()

  Returns the URL text for the entity.

  Returns:
    The URL text (possibly `null`).

### setURLText

    public void setURLText(java.lang.String text)

  Sets the URL text.

  Parameters:
    `text` - the text (`null` permitted).

### getShapeType

    public java.lang.String 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

    public java.lang.String getShapeCoords()

  Returns the shape coordinates as a string.

  Returns:
    The shape coordinates (never `null`).

### getImageMapAreaTag

    public java.lang.String getImageMapAreaTag(ToolTipTagFragmentGenerator toolTipTagFragmentGenerator,
                                               URLTagFragmentGenerator urlTagFragmentGenerator)

  Returns an HTML image map tag for this entity. The returned fragment should be `XHTML 1.0` compliant.

  Parameters:
    `toolTipTagFragmentGenerator` - the generator for tooltip fragment.
    `urlTagFragmentGenerator` - the generator for the URL fragment.
  Returns:
    The HTML tag.

### equals

    public boolean equals(java.lang.Object obj)

  Tests the entity for equality with an arbitrary object.

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `obj` - the object to test against (`null` permitted).
  Returns:
    A boolean.

### clone

    public java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException

  Returns a clone of the entity.

  Specified by:
    `clone` in interface `org.jfree.util.PublicCloneable`
  Overrides:
    `clone` in class `java.lang.Object`
  Returns:
    A clone.
  Throws:
    `java.lang.CloneNotSupportedException` - if there is a problem cloning the entity.