Extra refreshes in SimpleList Box


#1

Hi,

I noticed a few extra refreshes in Listbox or SimpleListBox, i.e. when we use keyboard for scrolling, the entire Listbox gets refreshed, instead only previously selected row and the row to be selected next has to be refreshed… similarly if we click on any of the row, then also as same problem exists

This extra refreshes can be observed using Quartz Debug available in Developer Tools for Mac…

We can check Finder as well, it works similar to a Listbox. At any point of time only two rows are refreshed…

I found this problem in jucedemo as well…

Can you suggest me something to overcome this…

Thanks in advance

Dave


#2

It’s up to the row components in a list whether they repaint themselves or not… In the SimpleListBox, it always repaints them because it doesn’t know whether the data that your subclass is representing has changed or not, and repainting isn’t such a big deal. If you need more control over the list, you could try creating a list with custom components that are a bit smarter about this.


#3