Class IntervalXYToolTipGenerator

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT_TOOL_TIP_FORMAT
      The default item label format.
    • Constructor Summary

      Constructors 
      Constructor Description
      IntervalXYToolTipGenerator()
      Creates a new tooltip generator using default number formatters.
      IntervalXYToolTipGenerator​(java.lang.String formatString, java.text.DateFormat xFormat, java.text.DateFormat yFormat)
      Creates a new tool tip generator using the specified date formatters.
      IntervalXYToolTipGenerator​(java.lang.String formatString, java.text.DateFormat xFormat, java.text.NumberFormat yFormat)
      Creates a new tool tip generator using the specified formatters.
      IntervalXYToolTipGenerator​(java.lang.String formatString, java.text.NumberFormat xFormat, java.text.DateFormat yFormat)
      Creates a new tool tip generator using the specified formatters (a number formatter for the x-values and a date formatter for the y-values).
      IntervalXYToolTipGenerator​(java.lang.String formatString, java.text.NumberFormat xFormat, java.text.NumberFormat yFormat)
      Creates a new tooltip generator using the specified number formatters.
    • Field Detail

      • DEFAULT_TOOL_TIP_FORMAT

        public static final java.lang.String DEFAULT_TOOL_TIP_FORMAT
        The default item label format.
        See Also:
        Constant Field Values
    • Constructor Detail

      • IntervalXYToolTipGenerator

        public IntervalXYToolTipGenerator()
        Creates a new tooltip generator using default number formatters.
      • IntervalXYToolTipGenerator

        public IntervalXYToolTipGenerator​(java.lang.String formatString,
                                          java.text.NumberFormat xFormat,
                                          java.text.NumberFormat yFormat)
        Creates a new tooltip generator using the specified number formatters.
        Parameters:
        formatString - the item label format string (null not permitted).
        xFormat - the format object for the x values (null not permitted).
        yFormat - the format object for the y values (null not permitted).
      • IntervalXYToolTipGenerator

        public IntervalXYToolTipGenerator​(java.lang.String formatString,
                                          java.text.DateFormat xFormat,
                                          java.text.NumberFormat yFormat)
        Creates a new tool tip generator using the specified formatters.
        Parameters:
        formatString - the item label format string (null not permitted).
        xFormat - the format object for the x values (null not permitted).
        yFormat - the format object for the y values (null not permitted).
      • IntervalXYToolTipGenerator

        public IntervalXYToolTipGenerator​(java.lang.String formatString,
                                          java.text.NumberFormat xFormat,
                                          java.text.DateFormat yFormat)
        Creates a new tool tip generator using the specified formatters (a number formatter for the x-values and a date formatter for the y-values).
        Parameters:
        formatString - the item label format string (null not permitted).
        xFormat - the format object for the x values (null permitted).
        yFormat - the format object for the y values (null not permitted).
      • IntervalXYToolTipGenerator

        public IntervalXYToolTipGenerator​(java.lang.String formatString,
                                          java.text.DateFormat xFormat,
                                          java.text.DateFormat yFormat)
        Creates a new tool tip generator using the specified date formatters.
        Parameters:
        formatString - the label format string (null not permitted).
        xFormat - the format object for the x values (null not permitted).
        yFormat - the format object for the y values (null not permitted).
    • Method Detail

      • createItemArray

        protected java.lang.Object[] createItemArray​(XYDataset dataset,
                                                     int series,
                                                     int item)
        Creates the array of items that can be passed to the MessageFormat class for creating labels.
        Overrides:
        createItemArray in class AbstractXYItemLabelGenerator
        Parameters:
        dataset - the dataset (null not permitted).
        series - the series (zero-based index).
        item - the item (zero-based index).
        Returns:
        An array of seven items from the dataset formatted as String objects (never null).
      • generateToolTip

        public java.lang.String generateToolTip​(XYDataset dataset,
                                                int series,
                                                int item)
        Generates the tool tip text for an item in a dataset.
        Specified by:
        generateToolTip in interface XYToolTipGenerator
        Parameters:
        dataset - the dataset (null not permitted).
        series - the series index (zero-based).
        item - the item index (zero-based).
        Returns:
        The tool tip text (possibly null).
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Returns an independent copy of the generator.
        Specified by:
        clone in interface PublicCloneable
        Overrides:
        clone in class AbstractXYItemLabelGenerator
        Returns:
        A clone.
        Throws:
        java.lang.CloneNotSupportedException - if cloning is not supported.
      • equals

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