TimeSeriesToolTipGenerator Timeout Question

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Alex

TimeSeriesToolTipGenerator Timeout Question

Post by Alex » Wed Feb 26, 2003 2:29 am

Hi,

Is their anyway to configure the tooltip associated with a data point in a
a TimeSeries to display until the user moves his mouse?

Currently, the tooltip display for approximately 5 seconds and disappears.
I would like to keep the tooltip active until the user moves her/his mouse
pointer.

Does anyone have any ideas?

Many Thanks:

Alex

Arnaud

Re: TimeSeriesToolTipGenerator Timeout Question

Post by Arnaud » Wed Feb 26, 2003 12:18 pm

Hello,

I guess it's the reason of a ToolTip to be displayed in a short period of time.

The other way would be to print the label on the graph... which I'm working on... look at http://www.object-refinery.com/phorum-3 ... 411&t=7405

I'm testing a ValueLabelGenerator, similar to the ToolTipGenerator, so that we will be able to display values, as well as custom text on the datapoints.

Regards,

Arnaud

Alex

Re: TimeSeriesToolTipGenerator Timeout Question

Post by Alex » Wed Feb 26, 2003 6:55 pm

Hi Arnaud,

Thanks for the info. Where is the timeout for the tooltip configured?

Once again thanks for the response.

Alex

Klaus Rheinwald

Re: TimeSeriesToolTipGenerator Timeout Question

Post by Klaus Rheinwald » Wed Feb 26, 2003 10:27 pm

ToolTipManager.sharedInstance() .getDismissDelay()?

Alex

Re: TimeSeriesToolTipGenerator Timeout Question

Post by Alex » Thu Feb 27, 2003 3:24 pm

Hi Klaus,

I could not find the sharedInstance() method or getDismissDelay() method
in any of the JFREECHART classes. Are they part of the JCommon distribution?


Thanks:

Alex

Alex

Re: TimeSeriesToolTipGenerator Timeout Question

Post by Alex » Thu Feb 27, 2003 3:27 pm

Klaus,

Oops I found this as part of the JDK distribution. Thanks for the info!!

Alex

Alex

Re: TimeSeriesToolTipGenerator Timeout Question

Post by Alex » Thu Feb 27, 2003 3:47 pm

I was able to set the tooltip timeout via:


//The tooltip will hide after 1 hour. If the user moves the mouse pointer
//the tooltip will hide by default
ToolTipManager.sharedInstance().setDismissDelay(3600000);


By the way, when I ran the following:
ToolTipManager.sharedInstance().getDismissDelay();

I found that the default was 4000 milliseconds (4 seconds).

In order to use this class add the following import.
import javax.swing.ToolTipManager;

Once again thanks for all the responses. JFreecharts is awesome!

Alex

Locked