status bar instead of tool tips

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

status bar instead of tool tips

Post by Elio » Wed Oct 30, 2002 3:15 pm

Hi!!

I have a scatterplot chart and I want to use a status bar (that shows exactly the same text of the tool tips) instead of using a tool tip.

Is it possible? if it isnt, how can i make the tool tips to show (all the time) while the mouse is over the point (and not disappear after some time)?

Thanks!!
Elio

Richard Atkinson

Re: status bar instead of tool tips

Post by Richard Atkinson » Wed Oct 30, 2002 3:52 pm

Elio,

You can use OverLib (http://www.bosrup.com/web/overlib/) to display the tooltips which will display the tooltips all the time. Look for the options in the ChartUtilities methods.

Regards,
Richard...

Elio

status bar instead of tool tips ...

Post by Elio » Wed Oct 30, 2002 4:25 pm

Thanks for the response!!!

But what i want to do is that the tooltip seems to disappear after about 3 seconds, and i want to make it static (disappear oly when the mouse isnt over the point).

How can do it?

Thanks!!
Elio.

Richard Atkinson

Re: status bar instead of tool tips

Post by Richard Atkinson » Wed Oct 30, 2002 4:28 pm

That's what OverLib does because it uses Javascript and DHTML to produce the tooltip rather than relying on the browser implementation of tooltips. Check out the OverLib web site to see for yourself.

Regards,
Richard...

Elio

Re: status bar instead of tool tips

Post by Elio » Wed Oct 30, 2002 5:44 pm

Sorry, i forget to say that i am using jfreechart with swing (jframe).

Thanks again!!!

Elio.

Dave Gilbert

Re: status bar instead of tool tips

Post by Dave Gilbert » Wed Oct 30, 2002 6:29 pm

Hi Elio,

If you look in the getToolTipText(...) method of the ChartPanel class, you'll see how the text is obtained. You could display the same text, or anything else derived from the ChartEntity, on a status bar or anywhere else you want.

An alternative approach is to register a ChartMouseListener with the ChartPanel and receive events that contain information about the current mouse position, including the current ChartEntity (if any) at the mouse point.

Regards,

DG.

Locked