I use a selection JList widget with an XYPlot. If the user selects one
or more names in the JList, I then
1) 'gray out' all the other XYSeries in the XYSeriesCollection
2) leave the color of the selected series unchanged
3) the selected lines stand out nicely against the background
of the grayed-out lines -- most of the time
This works fine, except that the original order of the (possibly
many) series is preserved; gray lines may be drawn on top
of the selected (and still brightly colored) lines.
How can I ensure that my selected lines are drawn on top of
the grayed-out lines?
Thanks!
- Paul Shannon
Institute for Systems Biology
Seattle
draw on XYSeries on top of others
Re: draw one XYSeries on top of others
replying, belatedly, to my own posting: the solution -- for me, anyway -- turned out to be to
1) remove all XYSeries from the collection
2) add back the 'selected' xeries first
3) add the deselected series last
4) set the rendering color of each deselected series to gray
the default rendering order (thanks, dhchou and folerje for the
tip) appears to be REVERSE, so that first added are last drawn.
- Paul
1) remove all XYSeries from the collection
2) add back the 'selected' xeries first
3) add the deselected series last
4) set the rendering color of each deselected series to gray
the default rendering order (thanks, dhchou and folerje for the
tip) appears to be REVERSE, so that first added are last drawn.
- Paul