Question

I've bind a ListView to a SynchronizedObservableList. Can I modify the list (add, remove, etc.) out of the UI Thread? There would be no exception but get the UI correctly synchronized?

Était-ce utile?

La solution

No: if the observable list is being used for the data for the ListView (or the data for the ListView is are bound to it), then it should only be modified on the FX Application Thread.

While using a synchronized list offers some synchronization guarantees on the list data, since you have bound the ListView to it, modifying the synchronizedObservableList will cause changes in the ListView's properties (for example, it will cause changes to its cells). There are no synchronization guarantees on the properties of the ListView itself and any changes to those properties need to occur on the FX Application Thread.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top