Package org.jfree.chart.labels
Class HighLowItemLabelGenerator
java.lang.Object
org.jfree.chart.labels.HighLowItemLabelGenerator
- All Implemented Interfaces:
Serializable
,Cloneable
,XYLabelGenerator
,XYToolTipGenerator
,org.jfree.util.PublicCloneable
public class HighLowItemLabelGenerator extends Object implements XYLabelGenerator, XYToolTipGenerator, Cloneable, org.jfree.util.PublicCloneable, Serializable
A standard item label generator for plots that use data from a
HighLowDataset
.- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description HighLowItemLabelGenerator()
Creates an item label generator using the default date and number formats.HighLowItemLabelGenerator(DateFormat dateFormatter, NumberFormat numberFormatter)
Creates a tool tip generator using the supplied date formatter. -
Method Summary
Modifier and Type Method Description Object
clone()
Returns an independent copy of the generator.boolean
equals(Object o)
Tests if this object is equal to another.String
generateLabel(XYDataset dataset, int series, int category)
Generates a label for the specified item.String
generateToolTip(XYDataset dataset, int series, int item)
Generates a tooltip text item for a particular item within a series.
-
Constructor Details
-
HighLowItemLabelGenerator
public HighLowItemLabelGenerator()Creates an item label generator using the default date and number formats. -
HighLowItemLabelGenerator
Creates a tool tip generator using the supplied date formatter.- Parameters:
dateFormatter
- the date formatter (null
not permitted).numberFormatter
- the number formatter (null
not permitted).
-
-
Method Details
-
generateToolTip
Generates a tooltip text item for a particular item within a series.- Specified by:
generateToolTip
in interfaceXYToolTipGenerator
- Parameters:
dataset
- the dataset.series
- the series (zero-based index).item
- the item (zero-based index).- Returns:
- the tooltip text.
-
generateLabel
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:
generateLabel
in interfaceXYLabelGenerator
- Parameters:
dataset
- the dataset (null
not permitted).series
- the series index (zero-based).category
- the category index (zero-based).- Returns:
- the label (possibly
null
).
-
clone
Returns an independent copy of the generator.- Specified by:
clone
in interfaceorg.jfree.util.PublicCloneable
- Returns:
- A clone.
- Throws:
CloneNotSupportedException
- if cloning is not supported.
-
equals
Tests if this object is equal to another.
-