@Test public void testGenerateLabel() { StandardXYSeriesLabelGenerator g = new StandardXYSeriesLabelGenerator("Series {0}"); XYSeriesCollection dataset = new XYSeriesCollection(); dataset.addSeries(new XYSeries("1")); dataset.addSeries(new XYSeries("2")); assertEquals("Series 1", g.generateLabel(dataset, 0)); assertEquals("Series 2", g.generateLabel(dataset, 1)); }
@Override public String generateLabel(XYDataset dataset, int series) { if (dataset == null) { throw new IllegalArgumentException("Null 'dataset' argument."); } String label = MessageFormat.format( this.formatPattern, createItemArray(dataset, series) ); return label; }
StandardXYSeriesLabelGenerator implements XYSeriesLabelGenerator,
        Cloneable, PublicCloneable, Serializable { @Override public String generateLabel(XYDataset dataset, int series) { if (dataset == null) { throw new IllegalArgumentException("Null 'dataset' argument."); } String label = MessageFormat.format( this.formatPattern, createItemArray(dataset, series) ); return label; } }
StandardXYSeriesLabelGenerator implements XYSeriesLabelGenerator,
        Cloneable, PublicCloneable, Serializable { @Override public String generateLabel(XYDataset dataset, int series) { if (dataset == null) { throw new IllegalArgumentException("Null 'dataset' argument."); } String label = MessageFormat.format( this.formatPattern, createItemArray(dataset, series) ); return label; } StandardXYSeriesLabelGenerator();  StandardXYSeriesLabelGenerator(String format); }
StandardXYSeriesLabelGenerator implements XYSeriesLabelGenerator,
        Cloneable, PublicCloneable, Serializable { @Override public String generateLabel(XYDataset dataset, int series) { if (dataset == null) { throw new IllegalArgumentException("Null 'dataset' argument."); } String label = MessageFormat.format( this.formatPattern, createItemArray(dataset, series) ); return label; } StandardXYSeriesLabelGenerator();  StandardXYSeriesLabelGenerator(String format); @Override String generateLabel(XYDataset dataset, int series); @Override Object clone(); @Override boolean equals(Object obj); @Override int hashCode(); }
StandardXYSeriesLabelGenerator implements XYSeriesLabelGenerator,
        Cloneable, PublicCloneable, Serializable { @Override public String generateLabel(XYDataset dataset, int series) { if (dataset == null) { throw new IllegalArgumentException("Null 'dataset' argument."); } String label = MessageFormat.format( this.formatPattern, createItemArray(dataset, series) ); return label; } StandardXYSeriesLabelGenerator();  StandardXYSeriesLabelGenerator(String format); @Override String generateLabel(XYDataset dataset, int series); @Override Object clone(); @Override boolean equals(Object obj); @Override int hashCode(); static final String DEFAULT_LABEL_FORMAT; }