org.jfree.chart.entity
Class ChartEntity

java.lang.Object
  |
  +--org.jfree.chart.entity.ChartEntity
Direct Known Subclasses:
CategoryItemEntity, ContourEntity, PieSectionEntity, XYItemEntity

public class ChartEntity
extends java.lang.Object

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

Author:
David Gilbert

Constructor Summary
ChartEntity(java.awt.Shape area, java.lang.String toolTipText)
          Creates a new entity.
ChartEntity(java.awt.Shape area, java.lang.String toolTipText, java.lang.String urlText)
          Creates a new entity.
 
Method Summary
 java.awt.Shape getArea()
          Returns the area occupied by the entity (in Java 2D space).
 java.lang.String getImageMapAreaTag()
          Returns an HTML image map tag tag for this entity.
 java.lang.String getImageMapAreaTag(boolean useOverLibForToolTips)
          Returns an HTML image map tag 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartEntity

public ChartEntity(java.awt.Shape area,
                   java.lang.String toolTipText)
Creates a new entity.

Parameters:
area - the area.
toolTipText - the tool tip text (if any).

ChartEntity

public ChartEntity(java.awt.Shape area,
                   java.lang.String toolTipText,
                   java.lang.String urlText)
Creates a new entity.

Parameters:
area - the area.
toolTipText - the tool tip text (if any).
urlText - the URL text for HTML image maps (if any).
Method Detail

getArea

public java.awt.Shape getArea()
Returns the area occupied by the entity (in Java 2D space).

Returns:
the area.

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.

getToolTipText

public java.lang.String getToolTipText()
Returns the tool tip text for the entity.

Returns:
the tool tip text (if any).

setToolTipText

public void setToolTipText(java.lang.String text)
Sets the tool tip text.

Parameters:
text - the text.

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.

getShapeCoords

public java.lang.String getShapeCoords()
Returns the shape coordinates as a string.

Returns:
the shape coordinates.

getImageMapAreaTag

public java.lang.String getImageMapAreaTag()
Returns an HTML image map tag tag for this entity.

Returns:
the HTML tag

getImageMapAreaTag

public java.lang.String getImageMapAreaTag(boolean useOverLibForToolTips)
Returns an HTML image map tag tag for this entity.

Parameters:
useOverLibForToolTips - Whether to use OverLIB for tooltips (http://www.bosrup.com/web/overlib/).
Returns:
The HTML tag

getURLText

public java.lang.String getURLText()
Returns the URL text for the entity.

Returns:
the URL text (if any).

setURLText

public void setURLText(java.lang.String text)
Sets the URL text.

Parameters:
text - the text.