public class

StandardCategorySeriesLabelGenerator

extends Object
implements Serializable Cloneable CategorySeriesLabelGenerator
java.lang.Object
   ↳ org.jfree.chart.labels.StandardCategorySeriesLabelGenerator

Class Overview

A standard series label generator for plots that use data from a CategoryDataset.

Summary

Constants
String DEFAULT_LABEL_FORMAT The default item label format.
Public Constructors
StandardCategorySeriesLabelGenerator()
Creates a default series label generator (uses DEFAULT_LABEL_FORMAT).
StandardCategorySeriesLabelGenerator(String format)
Creates a new series label generator.
Public Methods
Object clone()
Returns an independent copy of the generator.
boolean equals(Object obj)
Tests this object for equality with an arbitrary object.
String generateLabel(CategoryDataset dataset, int series)
Generates a label for the specified series.
int hashCode()
Returns a hash code for this instance.
Protected Methods
Object[] createItemArray(CategoryDataset dataset, int series)
Creates the array of items that can be passed to the MessageFormat class for creating labels.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.jfree.chart.labels.CategorySeriesLabelGenerator

Constants

public static final String DEFAULT_LABEL_FORMAT

The default item label format.

Constant Value: "{0}"

Public Constructors

public StandardCategorySeriesLabelGenerator ()

Creates a default series label generator (uses DEFAULT_LABEL_FORMAT).

public StandardCategorySeriesLabelGenerator (String format)

Creates a new series label generator.

Parameters
format the format pattern (null not permitted).

Public Methods

public Object clone ()

Returns an independent copy of the generator.

Returns
  • A clone.
Throws
CloneNotSupportedException if cloning is not supported.

public boolean equals (Object obj)

Tests this object for equality with an arbitrary object.

Parameters
obj the other object (null permitted).
Returns
  • A boolean.

public String generateLabel (CategoryDataset dataset, int series)

Generates a label for the specified series.

Parameters
dataset the dataset (null not permitted).
series the series.
Returns
  • A series label.

public int hashCode ()

Returns a hash code for this instance.

Returns
  • A hash code.

Protected Methods

protected Object[] createItemArray (CategoryDataset dataset, int series)

Creates the array of items that can be passed to the MessageFormat class for creating labels.

Parameters
dataset the dataset (null not permitted).
series the series (zero-based index).
Returns
  • The items (never null).