tornadofx / tornadofx / javafx.collections.ObservableList

Extensions for javafx.collections.ObservableList

asUnmodifiable fun <T> ObservableList<T>.asUnmodifiable(): ObservableList<T>

Returns an unmodifiable ObservableList that wraps the original list.

asyncItems fun <T> ObservableList<T>.asyncItems(func: FXTask<*>.() -> Collection<T>): <ERROR CLASS>
fill fun <T> ObservableList<T>.fill(value: T): Unit

Fills the observable list with the provided value. Fires only one change notification on the list.

invalidate fun <T> ObservableList<T>.invalidate(): Unit
onChange fun <T> ObservableList<T>.onChange(op: (Change<out T>) -> Unit): <ERROR CLASS>
reverse fun <T> ObservableList<T>.reverse(): Unit

Reverse the order in the observable list. Fires only one change notification on the list.

shuffle fun <T> ObservableList<T>.shuffle(): Unit

Randomly shuffles elements in this observable list. Fires only one change notification on the list.

fun <T> ObservableList<T>.shuffle(random: Random): Unit

Randomly shuffles elements in this observable list using the specified random instance as the source of randomness. Fires only one change notification on the list.

sizeProperty val ObservableList<*>.sizeProperty: IntegerBinding
sort fun <T : Comparable<T>> ObservableList<T>.sort(): Unit

Sorts elements in the observable list according to their natural sort order. Fires only one change notification on the list.

sortBy fun <T, R : Comparable<R>> ObservableList<T>.sortBy(selector: (T) -> R?): Unit

Sorts elements in the observable list according to natural sort order of the value returned by specified selector function. Fires only one change notification on the list.

sortByDescending fun <T, R : Comparable<R>> ObservableList<T>.sortByDescending(selector: (T) -> R?): Unit

Sorts elements in the observable list descending according to natural sort order of the value returned by specified selector function. Fires only one change notification on the list.

sortWith fun <T> ObservableList<T>.sortWith(comparator: Comparator<in T>): Unit

Sorts elements in the observable list according to the order specified with comparator. Fires only one change notification on the list.