This content has been marked as final. Show 5 replies
A google search revealed this link =>1 person found this helpful
Which deeplinks into the a preview of Chapter 6 "JavaFX collections" of the Pro JavaFX2 book which contains an executable example that is an excellent overview of JavaFX Collections and thoroughly answers your question.
The Pro JavaFX2 book is available for purchase in printed form from:
You are looking for Bindings.bindContent(list1, list2);
(available with JavaFX 2.1)
@jsmith Thanks for the hint. Could be helpful to understand these change events.
@csh great, I was hoping for something like this. It will work at least for the case where the lists have the same content type. It would be great if there were a version which allowed to convert from one content type to another.
A great and helpful book, though it says nothing about "wasUpdated()" (as you can see on page 232 in the UML diagram; Figure 6-1), since wasUpdated() was introduced with JavaFX 2.1.
So I wonder, what would be the supposed way, to listen contentwise to a list. In other words, how to be notified about changes IN a list a element, without externally registering listeners.
I thought, this can be done only, if the list elements implement Observable, or any sub-interface. Unfortunately, SimpleListProperty does not seem to have implemented wasUpdated() for such list elements. So I was not able to answer my above question :)