Package org.jfree.chart.labels
Class StandardContourToolTipGenerator
java.lang.Object
org.jfree.chart.labels.StandardContourToolTipGenerator
- All Implemented Interfaces:
Serializable,ContourToolTipGenerator
public class StandardContourToolTipGenerator extends Object implements ContourToolTipGenerator, Serializable
A standard tooltip generator for plots that use data from an
ContourDataset.- Author:
- David M. O'Donnell
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description StandardContourToolTipGenerator() -
Method Summary
Modifier and Type Method Description booleanequals(Object o)Tests if this object is equal to another.StringgenerateToolTip(ContourDataset data, int item)Generates a tooltip text item for a particular item within a series.static DecimalFormatgetDecimalFormat(String pattern)static StringstringReplace(String s, String find, String replace)Replace occurrences of a substring.
-
Constructor Details
-
StandardContourToolTipGenerator
public StandardContourToolTipGenerator()
-
-
Method Details
-
stringReplace
Replace occurrences of a substring. http://ostermiller.org/utils/StringHelper.html StringHelper.replace("1-2-3", "-", "|");
result: "1|2|3"
StringHelper.replace("-1--2-", "-", "|");
result: "|1||2|"
StringHelper.replace("123", "", "|");
result: "123"
StringHelper.replace("1-2---3----4", "--", "|");
result: "1-2|-3||4"
StringHelper.replace("1-2---3----4", "--", "---");
result: "1-2----3------4"- Parameters:
s- String to be modified.find- String to find.replace- String to replace.- Returns:
- a string with all the occurrences of the string to find replaced.
- Throws:
NullPointerException- if s is null.
-
getDecimalFormat
-
generateToolTip
Generates a tooltip text item for a particular item within a series.- Specified by:
generateToolTipin interfaceContourToolTipGenerator- Parameters:
data- the dataset.item- the item index (zero-based).- Returns:
- The tooltip text.
-
equals
Tests if this object is equal to another.
-