com.ge.research.charts.jfree.chart.tooltips
Class HighLowTooltipGenerator

java.lang.Object
  extended bycom.ge.research.charts.tooltips.AbstractTooltipGenerator
      extended bycom.ge.research.charts.jfree.chart.tooltips.HighLowTooltipGenerator
All Implemented Interfaces:
java.io.Serializable, org.jfree.chart.tooltips.ToolTipGenerator, org.jfree.chart.tooltips.XYToolTipGenerator

public class HighLowTooltipGenerator
extends AbstractTooltipGenerator
implements org.jfree.chart.tooltips.XYToolTipGenerator, java.io.Serializable

A generic tooltip generator for plots that use data from a HighLowDataset.

Version:
$Revision: 1.1 $ $Date: 2006/08/11 00:17:43 $
Author:
garbiras
See Also:
Serialized Form

Field Summary
static java.lang.String DEFAULT_HIGHLOW_TOOLTIP
          The default tooltip string to use for HighLow datasets
 
Fields inherited from class com.ge.research.charts.tooltips.AbstractTooltipGenerator
CURRENCYSTYLE, DEFAULT_DATE_FORMAT, DEFAULT_ITEM_LABEL_NUMBER_FORMAT, DEFAULT_ITEM_VALUE_NUMBER_FORMAT, DEFAULT_TOOLTIP, INTEGERSTYLE, ITEM_LABEL_PLACEHOLDER, ITEM_VALUE_PLACEHOLDER, NUMBERSTYLE, PERCENTSTYLE, SERIES_NAME_PLACEHOLDER
 
Constructor Summary
HighLowTooltipGenerator()
          Default constructor.
 
Method Summary
 java.lang.String generateToolTip(java.lang.String seriesName, java.lang.Object item, java.lang.Object high, java.lang.Object low, java.lang.Object open, java.lang.Object close)
          Constructs the tooltip for a datapoint, using the tooltip string format as well as the various applicable date and number formaters.
 java.lang.String generateToolTip(org.jfree.data.XYDataset arg0, int series, int item)
           
 void setTooltipStr(java.lang.String string)
          Sets the tooltip string to use for displaying information about the datapoints of a chart.
 
Methods inherited from class com.ge.research.charts.tooltips.AbstractTooltipGenerator
generateToolTip, getDateFormat, getDateFormatString, getItemLabelNumberFormat, getItemLabelNumberFormatString, getItemValueNumberFormat, getItemValueNumberFormatString, getStringValue, getTooltipStr, setDateFormat, setItemLabelNumberFormat, setItemLabelNumberFormat, setItemValueNumberFormat, setItemValueNumberFormat
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_HIGHLOW_TOOLTIP

public static final java.lang.String DEFAULT_HIGHLOW_TOOLTIP
The default tooltip string to use for HighLow datasets

See Also:
Constant Field Values
Constructor Detail

HighLowTooltipGenerator

public HighLowTooltipGenerator()
Default constructor. Sets the default highlow tooltip string.

See Also:
setTooltipStr(java.lang.String), DEFAULT_HIGHLOW_TOOLTIP
Method Detail

generateToolTip

public java.lang.String generateToolTip(java.lang.String seriesName,
                                        java.lang.Object item,
                                        java.lang.Object high,
                                        java.lang.Object low,
                                        java.lang.Object open,
                                        java.lang.Object close)
Constructs the tooltip for a datapoint, using the tooltip string format as well as the various applicable date and number formaters.

Parameters:
seriesName - the name of the dataseries the datapoint belongs to
item - the datapoint "place" (category or domain value)
high - the high datapoint value
low - the low datapoint value
open - the open datapoint value
close - the close datapoint value
Returns:
The tooltip string to display for the datapoint

generateToolTip

public java.lang.String generateToolTip(org.jfree.data.XYDataset arg0,
                                        int series,
                                        int item)
Specified by:
generateToolTip in interface org.jfree.chart.tooltips.XYToolTipGenerator

setTooltipStr

public void setTooltipStr(java.lang.String string)
Description copied from class: AbstractTooltipGenerator
Sets the tooltip string to use for displaying information about the datapoints of a chart. If the argument string is null or StringUtils.EMPTY_STRING, then the tooltip string is set to the AbstractTooltipGenerator.DEFAULT_TOOLTIP.

Overrides:
setTooltipStr in class AbstractTooltipGenerator
Parameters:
string - the tooltip string to use for displaying information about the datapoints of a chart
See Also:
DEFAULT_HIGHLOW_TOOLTIP