Changing more than one item in a SortedList

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Changing more than one item in a SortedList

James Cook-12
I have a ListDataListener attached to an EventListModel. From time to time I
will change a property on one of my objects contained within the list and do
a sortedList.set(index, object) call to fire off a change event to my
listener class.

Currently, I am making a bulk change to all of the objects in the list to
notify my listener of the change. Is there any methods exposed (or
workarounds) that will allow me to mark all of the elements in the list as
"changed"?

P.S. Thanks for the sortedList.listIterator! Prior to noticing this method,
I was using the normal iterator, changing my object and calling
sortedList.set(index, object). As I did that, the sortedList resorted, and I
sometimes modified the same object several times, while others weren't
touched. But this has now caused my problem above. While modifying objects
using listIterator(), how do I tell SortedSet to fire the
contentsChanged(ListDataEvent)?


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]