Class StandardXYZToolTipGenerator

All Implemented Interfaces:
Serializable, Cloneable, XYToolTipGenerator, XYZToolTipGenerator, org.jfree.util.PublicCloneable

public class StandardXYZToolTipGenerator
extends StandardXYToolTipGenerator
implements XYZToolTipGenerator
A standard item label generator for use with XYZDataset data. Each value can be formatted as a number or as a date. TODO: add constructors for combinations of number and date formatters.
See Also:
Serialized Form
  • Field Details

    • DEFAULT_TOOL_TIP_FORMAT

      public static final String DEFAULT_TOOL_TIP_FORMAT
      The default tooltip format.
      See Also:
      Constant Field Values
  • Constructor Details

    • StandardXYZToolTipGenerator

      public StandardXYZToolTipGenerator()
      Creates a new tool tip generator using default number formatters for the x, y and z-values.
    • StandardXYZToolTipGenerator

      public StandardXYZToolTipGenerator​(String formatString, NumberFormat xFormat, NumberFormat yFormat, NumberFormat zFormat)
      Constructs a new tool tip generator using the specified number formatters.
      Parameters:
      formatString - the format string.
      xFormat - the format object for the x values (null not permitted).
      yFormat - the format object for the y values (null not permitted).
      zFormat - the format object for the z values (null not permitted).
    • StandardXYZToolTipGenerator

      public StandardXYZToolTipGenerator​(String formatString, DateFormat xFormat, DateFormat yFormat, DateFormat zFormat)
      Constructs a new tool tip generator using the specified date formatters.
      Parameters:
      formatString - the format string.
      xFormat - the format object for the x values (null not permitted).
      yFormat - the format object for the y values (null not permitted).
      zFormat - the format object for the z values (null not permitted).
  • Method Details

    • getZFormat

      public NumberFormat getZFormat()
      Returns the number formatter for the z-values.
      Returns:
      The number formatter (possibly null).
    • getZDateFormat

      public DateFormat getZDateFormat()
      Returns the date formatter for the z-values.
      Returns:
      The date formatter (possibly null).
    • generateToolTip

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

      public boolean equals​(Object obj)
      Tests this object for equality with an arbitrary object.
      Overrides:
      equals in class StandardXYToolTipGenerator
      Parameters:
      obj - the other object (null permitted).
      Returns:
      A boolean.