Package org.jfree.chart.entity
Class XYItemEntity
- java.lang.Object
-
- org.jfree.chart.entity.ChartEntity
-
- org.jfree.chart.entity.XYItemEntity
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,PublicCloneable
public class XYItemEntity extends ChartEntity
A chart entity that represents one item within anXYPlot
.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private XYDataset
dataset
The dataset.private int
item
The item.private static long
serialVersionUID
For serialization.private int
series
The series.
-
Constructor Summary
Constructors Constructor Description XYItemEntity(java.awt.Shape area, XYDataset dataset, int series, int item, 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 boolean
canEqual(java.lang.Object other)
Ensures symmetry between super/subclass implementations of equals.boolean
equals(java.lang.Object obj)
Tests the entity for equality with an arbitrary object.XYDataset
getDataset()
Returns the dataset this entity refers to.int
getItem()
Returns the item index.int
getSeriesIndex()
Returns the series index.int
hashCode()
Returns a hash code for this instance.void
setDataset(XYDataset dataset)
Sets the dataset this entity refers to.void
setItem(int item)
Sets the item index.void
setSeriesIndex(int series)
Sets the series index.java.lang.String
toString()
Returns a string representation of this instance, useful for debugging purposes.-
Methods inherited from class org.jfree.chart.entity.ChartEntity
clone, getArea, getImageMapAreaTag, getShapeCoords, getShapeType, getToolTipText, getURLText, setArea, setToolTipText, setURLText
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
For serialization.- See Also:
- Constant Field Values
-
dataset
private transient XYDataset dataset
The dataset.
-
series
private int series
The series.
-
item
private int item
The item.
-
-
Constructor Detail
-
XYItemEntity
public XYItemEntity(java.awt.Shape area, XYDataset dataset, int series, int item, java.lang.String toolTipText, java.lang.String urlText)
Creates a new entity.- Parameters:
area
- the area.dataset
- the dataset.series
- the series (zero-based index).item
- the item (zero-based index).toolTipText
- the tool tip text.urlText
- the URL text for HTML image maps.
-
-
Method Detail
-
getDataset
public XYDataset getDataset()
Returns the dataset this entity refers to.- Returns:
- The dataset.
-
setDataset
public void setDataset(XYDataset dataset)
Sets the dataset this entity refers to.- Parameters:
dataset
- the dataset.
-
getSeriesIndex
public int getSeriesIndex()
Returns the series index.- Returns:
- The series index.
-
setSeriesIndex
public void setSeriesIndex(int series)
Sets the series index.- Parameters:
series
- the series index (zero-based).
-
getItem
public int getItem()
Returns the item index.- Returns:
- The item index.
-
setItem
public void setItem(int item)
Sets the item index.- Parameters:
item
- the item index (zero-based).
-
equals
public boolean equals(java.lang.Object obj)
Tests the entity for equality with an arbitrary object.- Overrides:
equals
in classChartEntity
- Parameters:
obj
- the object (null
permitted).- 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:
canEqual
in classChartEntity
- Parameters:
other
- Object- Returns:
- true ONLY if the parameter is THIS class type
-
hashCode
public int hashCode()
Description copied from class:ChartEntity
Returns a hash code for this instance.- Overrides:
hashCode
in classChartEntity
- Returns:
- A hash code.
-
toString
public java.lang.String toString()
Returns a string representation of this instance, useful for debugging purposes.- Overrides:
toString
in classChartEntity
- Returns:
- A string.
-
-