Tool Tip Examples
-
- Posts: 26
- Joined: Thu Jun 07, 2007 10:07 pm
Tool Tip Examples
Hi, I want to use custom tool tips and I've read what is in the devepolers guide and the API and I went through the demos, but I don't see any examples. Does anyone know if there are any examples in the source code? I want to use tool tips on an XYLineChart. If anyone has any examples of this that would be great (I barely know where to start).
-
- Posts: 844
- Joined: Fri Oct 13, 2006 9:29 pm
- Location: Sunnyvale, CA
I don't have an example onhand, but here are the steps:
1. Create a class that implements the XYToolTipGenerator interface which returns your custom tool tip (see the source code for StandardXYToolTipGenerator for an example)
2. Use setBaseToolTipGenerator() to set the tool tip generator for the plot's renderer. Either you will create the renderer and add it to the plot or get the preexisting renderer from the plot.
Hope that gets your started.
1. Create a class that implements the XYToolTipGenerator interface which returns your custom tool tip (see the source code for StandardXYToolTipGenerator for an example)
2. Use setBaseToolTipGenerator() to set the tool tip generator for the plot's renderer. Either you will create the renderer and add it to the plot or get the preexisting renderer from the plot.
Hope that gets your started.
Richard West
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA
-
- Posts: 26
- Joined: Thu Jun 07, 2007 10:07 pm