
ATTN David Gilbert: ChartPanel -> JLayeredPane ?
ATTN David Gilbert: ChartPanel -> JLayeredPane ?
Any chance you could make ChartPanel extend JLayeredPane instead of JPanel ? It wouldn't remove any functionality but would add a whole new dimension (excuse the pun) to it's use. For instance adding toolbars would be easy as heck. 

-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
With 1.0.0 about to go out, it's too late to make a change like this. I'm not familiar with the JLayeredPane class, so I can't really judge whether this is a good idea or not. Perhaps you could put together a ChartLayeredPane class and a demo to show the advantages of it. If the advantages are clear, then I don't mind putting it into a future 1.0.x release alongside ChartPanel, then people could choose whichever suits them best.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


The advantage is that you can add a toolbar to a chartpanel without sweating blood to do itdavid.gilbert wrote:With 1.0.0 about to go out, it's too late to make a change like this. I'm not familiar with the JLayeredPane class, so I can't really judge whether this is a good idea or not. Perhaps you could put together a ChartLayeredPane class and a demo to show the advantages of it. If the advantages are clear, then I don't mind putting it into a future 1.0.x release alongside ChartPanel, then people could choose whichever suits them best.

I would post a demo but it would be huge and contain a bunch of our source code so i wont.
Well no because you can't set a different layoutmanager to each layer, so either the chart would have to be resized manually all the time or the toolbar would be stretched to fit the entire window. If ChartPanel were a JLayeredPane this wouln't be an issue :/reden wrote:Couldn't you just put the ChartPanel in a JLayeredPane and then have the same effect?