Hello,
I would like to put up my own popup menu over the ChartPanel. (This would let the user pick one of several charts to display in the chart area.)
Currently when I right click on a ChartPanel, a JFreeChart popup is activated.
Can someone advise me on how to put up my own menu instead of the JFreeChart's popup.
Thank you,
Ted Hill
Popup menu
Re: Popup menu
This is not something that is easy to do without modifying the ChartPanel source code (which, of course, you can do if you want to). I will add a task to my to-do list to make this possible without modifying the JFreeChart code.
Regards,
DG.
Regards,
DG.
Re: Popup menu
David,
What I did was to extend ChartPanel and add a method
public setPopupMenu(JPopupMenu myPopup)
{
popup = myPopup;
}
to expose the protected popup member. This works nicely,
Thanks for your help,
Ted Hill
What I did was to extend ChartPanel and add a method
public setPopupMenu(JPopupMenu myPopup)
{
popup = myPopup;
}
to expose the protected popup member. This works nicely,
Thanks for your help,
Ted Hill
Re: Popup menu
Thanks for the feedback Ted, I'll make a similar change to ChartPanel now for inclusion in 0.9.3.
Regards,
DG.
Regards,
DG.
Re: Popup menu
Hi David,
I've been away from JFreeChart for a while.
In ChartPanel, popup used to be protected, so my solution to installing my own popup menu shown earlier in this thread worked.
Now popup is private.
Is there another way to install my own popup menu on the ChartPanel now?
Thanks,
Ted Hill
I've been away from JFreeChart for a while.
In ChartPanel, popup used to be protected, so my solution to installing my own popup menu shown earlier in this thread worked.
Now popup is private.
Is there another way to install my own popup menu on the ChartPanel now?
Thanks,
Ted Hill