1 44 45 package org.jfree.chart.labels; 46 47 import java.io.Serializable ; 48 import java.text.DateFormat ; 49 import java.text.NumberFormat ; 50 51 import org.jfree.data.category.CategoryDataset; 52 53 57 public class StandardCategoryToolTipGenerator 58 extends AbstractCategoryItemLabelGenerator 59 implements CategoryToolTipGenerator, Serializable { 60 61 62 private static final long serialVersionUID = -6768806592218710764L; 63 64 65 public static final String DEFAULT_TOOL_TIP_FORMAT_STRING 66 = "({0}, {1}) = {2}"; 67 68 71 public StandardCategoryToolTipGenerator() { 72 super(DEFAULT_TOOL_TIP_FORMAT_STRING, NumberFormat.getInstance()); 73 } 74 75 82 public StandardCategoryToolTipGenerator(String labelFormat, 83 NumberFormat formatter) { 84 super(labelFormat, formatter); 85 } 86 87 94 public StandardCategoryToolTipGenerator(String labelFormat, 95 DateFormat formatter) { 96 super(labelFormat, formatter); 97 } 98 99 110 public String generateToolTip(CategoryDataset dataset, 111 int row, int column) { 112 return generateLabelString(dataset, row, column); 113 } 114 115 122 public boolean equals(Object obj) { 123 if (obj == this) { 124 return true; 125 } 126 if (!(obj instanceof StandardCategoryToolTipGenerator)) { 127 return false; 128 } 129 return super.equals(obj); 130 } 131 132 } 133 | Popular Tags |