Permutation of scene graph children

Tom Schindl tom.schindl at
Tue Dec 2 11:23:01 UTC 2014

I think the only really effecient way is to have the methods on the interface of observablelist because the algorithm has to have access to the internal datastructure.


Von meinem iPhone gesendet

> Am 02.12.2014 um 12:15 schrieb Werner Lehmann <lehmann at>:
> Hi Peter,
> didn't know about that one. It basically does what Tom suggested: makes a copy, sorts that one, then uses ObservableList.setAll to get one change event. So it is what I am doing already but still removes/adds children ;-)  The remove/add approach also does work for now, it just could be a little more efficent...
> Werner
>> On 02.12.2014 12:08, Pete Moss wrote:
>> You can also try using FXCollections.sort() directly on the children and
>> see if that helps since you were wondering about a sort operation. This is
>> intended specifically for use with ObservableList objects. This has worked
>> well for me. I don't know how many events this will end up firing, since it
>> wasn't important to me, but it is worth investigating.
>> - Peter

More information about the openjfx-dev mailing list