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 Details

    • StandardContourToolTipGenerator

      public StandardContourToolTipGenerator()
  • Method Details

    • stringReplace

      public static String stringReplace​(String s, String find, String replace)
      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

      public static DecimalFormat getDecimalFormat​(String pattern)
    • generateToolTip

      public String generateToolTip​(ContourDataset data, int item)
      Generates a tooltip text item for a particular item within a series.
      Specified by:
      generateToolTip in interface ContourToolTipGenerator
      Parameters:
      data - the dataset.
      item - the item index (zero-based).
      Returns:
      The tooltip text.
    • equals

      public boolean equals​(Object o)
      Tests if this object is equal to another.
      Overrides:
      equals in class Object
      Parameters:
      o - the other object.
      Returns:
      A boolean.