Package org.jfree.chart.entity
Class XYAnnotationEntity
- java.lang.Object
-
- org.jfree.chart.entity.ChartEntity
-
- org.jfree.chart.entity.XYAnnotationEntity
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,PublicCloneable
public class XYAnnotationEntity extends ChartEntity implements java.io.Serializable
A chart entity that represents an annotation on anXYPlot.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private intrendererIndexThe renderer index.private static longserialVersionUIDFor serialization.
-
Constructor Summary
Constructors Constructor Description XYAnnotationEntity(java.awt.Shape hotspot, int rendererIndex, java.lang.String toolTipText, java.lang.String urlText)Creates a new entity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanEqual(java.lang.Object other)Ensures symmetry between super/subclass implementations of equals.booleanequals(java.lang.Object obj)Tests the entity for equality with an arbitrary object.intgetRendererIndex()Returns the renderer index.inthashCode()Returns a hash code for this instance.voidsetRendererIndex(int index)Sets the renderer index.-
Methods inherited from class org.jfree.chart.entity.ChartEntity
clone, getArea, getImageMapAreaTag, getShapeCoords, getShapeType, getToolTipText, getURLText, setArea, setToolTipText, setURLText, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
For serialization.- See Also:
- Constant Field Values
-
rendererIndex
private int rendererIndex
The renderer index.
-
-
Constructor Detail
-
XYAnnotationEntity
public XYAnnotationEntity(java.awt.Shape hotspot, int rendererIndex, java.lang.String toolTipText, java.lang.String urlText)Creates a new entity.- Parameters:
hotspot- the area.rendererIndex- the rendererIndex (zero-based index).toolTipText- the tool tip text.urlText- the URL text for HTML image maps.
-
-
Method Detail
-
getRendererIndex
public int getRendererIndex()
Returns the renderer index.- Returns:
- The renderer index.
-
setRendererIndex
public void setRendererIndex(int index)
Sets the renderer index.- Parameters:
index- the item index (zero-based).
-
equals
public boolean equals(java.lang.Object obj)
Tests the entity for equality with an arbitrary object.- Overrides:
equalsin classChartEntity- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-
canEqual
public boolean canEqual(java.lang.Object other)
Ensures symmetry between super/subclass implementations of equals. For more detail, see http://jqno.nl/equalsverifier/manual/inheritance.- Overrides:
canEqualin classChartEntity- Parameters:
other- Object- Returns:
- true ONLY if the parameter is THIS class type
-
hashCode
public int hashCode()
Description copied from class:ChartEntityReturns a hash code for this instance.- Overrides:
hashCodein classChartEntity- Returns:
- A hash code.
-
-