I've implemented a simple XYToolTipGenerator and plugged it into my Chart and was very happy. Then I realized I'd like to customize a few things, like the tooltip delay, maybe the font and color, etc. So after a bit of googling I found out about ToolTipManager:
"Manages all the ToolTips in the system."
My problem is that I don't want to change all the tooltips in the VM--I'd only like to change some behaviors of tooltips in the Chart. The Chart is just a tiny part of a huge application and there's a very good chance that some people would get upset if the tooltip behavior changed in the app after the chart was loaded.
Any advice on how to best customize things like tooltip delay for only tooltips in a chart and not the whole app?
non-global Tooltip settings questions
Re: non-global Tooltip settings questions
See these methods in ChartPanel which can be customised on a per panel basis. They work by setting the appropriate properties in ToolTipManager on mouse entry and reset the original values on mouse exit.
Code: Select all
public void setInitialDelay(int delay)
public void setReshowDelay(int delay)
public void setDismissDelay(int delay)
Re: non-global Tooltip settings questions
Thanks, exactly what I was looking for.
I suppose we could just use the HTML markup features of tooltips for changing the style.
I suppose we could just use the HTML markup features of tooltips for changing the style.