@Test public void testGenerateLabel() { StandardCategoryItemLabelGenerator g = new StandardCategoryItemLabelGenerator("{2}", new DecimalFormat("0.000")); DefaultCategoryDataset dataset = new DefaultCategoryDataset(); dataset.addValue(1.0, "R0", "C0"); dataset.addValue(2.0, "R0", "C1"); dataset.addValue(3.0, "R1", "C0"); dataset.addValue(null, "R1", "C1"); String s = g.generateLabel(dataset, 0, 0); assertTrue(s.startsWith("1")); assertTrue(s.endsWith("000")); s = g.generateLabel(dataset, 1, 1); assertEquals("-", s); }
@Override public String generateLabel(CategoryDataset dataset, int row, int column) { return generateLabelString(dataset, row, column); }
StandardCategoryItemLabelGenerator extends AbstractCategoryItemLabelGenerator implements CategoryItemLabelGenerator, Cloneable, PublicCloneable,
               Serializable { @Override public String generateLabel(CategoryDataset dataset, int row, int column) { return generateLabelString(dataset, row, column); } }
StandardCategoryItemLabelGenerator extends AbstractCategoryItemLabelGenerator implements CategoryItemLabelGenerator, Cloneable, PublicCloneable,
               Serializable { @Override public String generateLabel(CategoryDataset dataset, int row, int column) { return generateLabelString(dataset, row, column); } StandardCategoryItemLabelGenerator();  StandardCategoryItemLabelGenerator(String labelFormat,
                                              NumberFormat formatter);  StandardCategoryItemLabelGenerator(String labelFormat,
            NumberFormat formatter, NumberFormat percentFormatter);  StandardCategoryItemLabelGenerator(String labelFormat,
                                              DateFormat formatter); }
StandardCategoryItemLabelGenerator extends AbstractCategoryItemLabelGenerator implements CategoryItemLabelGenerator, Cloneable, PublicCloneable,
               Serializable { @Override public String generateLabel(CategoryDataset dataset, int row, int column) { return generateLabelString(dataset, row, column); } StandardCategoryItemLabelGenerator();  StandardCategoryItemLabelGenerator(String labelFormat,
                                              NumberFormat formatter);  StandardCategoryItemLabelGenerator(String labelFormat,
            NumberFormat formatter, NumberFormat percentFormatter);  StandardCategoryItemLabelGenerator(String labelFormat,
                                              DateFormat formatter); @Override String generateLabel(CategoryDataset dataset, int row, int column); @Override boolean equals(Object obj); }
StandardCategoryItemLabelGenerator extends AbstractCategoryItemLabelGenerator implements CategoryItemLabelGenerator, Cloneable, PublicCloneable,
               Serializable { @Override public String generateLabel(CategoryDataset dataset, int row, int column) { return generateLabelString(dataset, row, column); } StandardCategoryItemLabelGenerator();  StandardCategoryItemLabelGenerator(String labelFormat,
                                              NumberFormat formatter);  StandardCategoryItemLabelGenerator(String labelFormat,
            NumberFormat formatter, NumberFormat percentFormatter);  StandardCategoryItemLabelGenerator(String labelFormat,
                                              DateFormat formatter); @Override String generateLabel(CategoryDataset dataset, int row, int column); @Override boolean equals(Object obj); static final String DEFAULT_LABEL_FORMAT_STRING; }