Documentation of 'org.jfree.chart.labels.StandardXYSeriesLabelGenerator' Java class
StandardXYSeriesLabelGenerator
org.jfree.chart.labels

Class StandardXYSeriesLabelGenerator

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, XYSeriesLabelGenerator, org.jfree.util.PublicCloneable


    public class StandardXYSeriesLabelGenerator
    extends java.lang.Object
    implements XYSeriesLabelGenerator, java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable
    A standard series label generator for plots that use data from an XYDataset.

    This class implements PublicCloneable by mistake but we retain this for the sake of backward compatibility.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String DEFAULT_LABEL_FORMAT
      The default item label format.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object clone()
      Returns an independent copy of the generator.
      boolean equals(java.lang.Object obj)
      Tests this object for equality with an arbitrary object.
      java.lang.String generateLabel(XYDataset dataset, int series)
      Generates a label for the specified series.
      int hashCode()
      Returns a hash code for this instance.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_LABEL_FORMAT

        public static final java.lang.String DEFAULT_LABEL_FORMAT
        The default item label format.
        See Also:
        Constant Field Values
    • Constructor Detail

      • StandardXYSeriesLabelGenerator

        public StandardXYSeriesLabelGenerator()
        Creates a default series label generator (uses DEFAULT_LABEL_FORMAT).
      • StandardXYSeriesLabelGenerator

        public StandardXYSeriesLabelGenerator(java.lang.String format)
        Creates a new series label generator.
        Parameters:
        format - the format pattern (null not permitted).
    • Method Detail

      • generateLabel

        public java.lang.String generateLabel(XYDataset dataset,
                                              int series)
        Generates a label for the specified series. This label will be used for the chart legend.
        Specified by:
        generateLabel in interface XYSeriesLabelGenerator
        Parameters:
        dataset - the dataset (null not permitted).
        series - the series.
        Returns:
        A series label.
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Returns an independent copy of the generator. This is unnecessary, because instances are immutable anyway, but we retain this behaviour for backwards compatibility.
        Specified by:
        clone in interface org.jfree.util.PublicCloneable
        Overrides:
        clone in class java.lang.Object
        Returns:
        A clone.
        Throws:
        java.lang.CloneNotSupportedException - if cloning is not supported.
      • equals

        public boolean equals(java.lang.Object obj)
        Tests this object for equality with an arbitrary object.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the other object (null permitted).
        Returns:
        A boolean.
      • hashCode

        public int hashCode()
        Returns a hash code for this instance.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        A hash code.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.