Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jfree.chart.labels
Class StandardXYZToolTipGenerator

    java.lang.Object
      org.jfree.chart.labels.AbstractXYItemLabelGenerator
          org.jfree.chart.labels.StandardXYToolTipGenerator
              org.jfree.chart.labels.StandardXYZToolTipGenerator

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

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 Summary
`static java.lang.String` | `DEFAULT_TOOL_TIP_FORMAT` The default tooltip format.

Constructor Summary
`StandardXYZToolTipGenerator()` Creates a new tool tip generator using default number formatters for the x, y and z-values.
`StandardXYZToolTipGenerator(java.lang.String formatString, java.text.DateFormat xFormat, java.text.DateFormat yFormat, java.text.DateFormat zFormat)` Constructs a new tool tip generator using the specified date formatters.
`StandardXYZToolTipGenerator(java.lang.String formatString, java.text.NumberFormat xFormat, java.text.NumberFormat yFormat, java.text.NumberFormat zFormat)` Constructs a new tool tip generator using the specified number formatters.

Method Summary
`protected java.lang.Object[]` | `createItemArray(XYZDataset dataset, int series, int item)` Creates the array of items that can be passed to the `MessageFormat` class for creating labels.
`boolean` | `equals(java.lang.Object obj)` Tests this object for equality with an arbitrary object.
`java.lang.String` | `generateToolTip(XYZDataset data, int series, int item)` Generates a tool tip text item for a particular item within a series.
`java.text.DateFormat` | `getZDateFormat()` Returns the date formatter for the z-values.
`java.text.NumberFormat` | `getZFormat()` Returns the number formatter for the z-values.

Methods inherited from class org.jfree.chart.labels.StandardXYToolTipGenerator
`clone, generateToolTip, getTimeSeriesInstance`

Methods inherited from class org.jfree.chart.labels.AbstractXYItemLabelGenerator
`createItemArray, generateLabelString, getFormatString, getXDateFormat, getXFormat, getYDateFormat, getYFormat`

Methods inherited from class java.lang.Object
`finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.jfree.chart.labels.XYToolTipGenerator
`generateToolTip`

Field Detail

### DEFAULT_TOOL_TIP_FORMAT

    public static final java.lang.String DEFAULT_TOOL_TIP_FORMAT

  The default tooltip format.

  See Also:
    Constant Field Values

Constructor Detail

### StandardXYZToolTipGenerator

    public StandardXYZToolTipGenerator()

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

### StandardXYZToolTipGenerator

    public StandardXYZToolTipGenerator(java.lang.String formatString,
                                       java.text.NumberFormat xFormat,
                                       java.text.NumberFormat yFormat,
                                       java.text.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(java.lang.String formatString,
                                       java.text.DateFormat xFormat,
                                       java.text.DateFormat yFormat,
                                       java.text.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 Detail

### getZFormat

    public java.text.NumberFormat getZFormat()

  Returns the number formatter for the z-values.

  Returns:
    The number formatter (possibly `null`).

### getZDateFormat

    public java.text.DateFormat getZDateFormat()

  Returns the date formatter for the z-values.

  Returns:
    The date formatter (possibly `null`).

### generateToolTip

    public java.lang.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.

### createItemArray

    protected java.lang.Object[] createItemArray(XYZDataset dataset,
                                                 int series,
                                                 int item)

  Creates the array of items that can be passed to the `MessageFormat` class for creating labels.

  Parameters:
    `dataset` - the dataset (`null` not permitted).
    `series` - the series (zero-based index).
    `item` - the item (zero-based index).
  Returns:
    The items (never `null`).

### equals

    public boolean equals(java.lang.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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD