Package org.jfree.chart.labels
Class SymbolicXYItemLabelGenerator
- java.lang.Object
-
- org.jfree.chart.labels.SymbolicXYItemLabelGenerator
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,XYItemLabelGenerator,XYToolTipGenerator,PublicCloneable
public class SymbolicXYItemLabelGenerator extends java.lang.Object implements XYItemLabelGenerator, XYToolTipGenerator, java.lang.Cloneable, PublicCloneable, java.io.Serializable
A standard item label generator for plots that use data from anXYDataset.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUIDFor serialization.
-
Constructor Summary
Constructors Constructor Description SymbolicXYItemLabelGenerator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Returns an independent copy of the generator.booleanequals(java.lang.Object obj)Tests if this object is equal to another.java.lang.StringgenerateLabel(XYDataset dataset, int series, int category)Generates a label for the specified item.java.lang.StringgenerateToolTip(XYDataset data, int series, int item)Generates a tool tip text item for a particular item within a series.inthashCode()Returns a hash code for this instance.private static doubleround(double value, int nb)Round a double value.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
For serialization.- See Also:
- Constant Field Values
-
-
Method Detail
-
generateToolTip
public java.lang.String generateToolTip(XYDataset data, int series, int item)
Generates a tool tip text item for a particular item within a series.- Specified by:
generateToolTipin interfaceXYToolTipGenerator- Parameters:
data- the dataset.series- the series number (zero-based index).item- the item number (zero-based index).- Returns:
- The tool tip text (possibly
null).
-
generateLabel
public java.lang.String generateLabel(XYDataset dataset, int series, int category)
Generates a label for the specified item. The label is typically a formatted version of the data value, but any text can be used.- Specified by:
generateLabelin interfaceXYItemLabelGenerator- Parameters:
dataset- the dataset (nullnot permitted).series- the series index (zero-based).category- the category index (zero-based).- Returns:
- The label (possibly
null).
-
round
private static double round(double value, int nb)Round a double value.- Parameters:
value- the value.nb- the exponent.- Returns:
- The rounded value.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionReturns an independent copy of the generator.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein classjava.lang.Object- Returns:
- A clone.
- Throws:
java.lang.CloneNotSupportedException- if cloning is not supported.
-
equals
public boolean equals(java.lang.Object obj)
Tests if this object is equal to another.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the other object.- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code for this instance.- Overrides:
hashCodein classjava.lang.Object- Returns:
- A hash code.
-
-