ListChange

interface ListChange<out E>

The data describing changes to an ObservableList.

See ObservableList.addChangeListener

A typical listener has the following structure :

val myListener = myObservableList.addChangeListener { _, change ->
    if ( change.removed.isNotEmpty() ) {
        // Act on removed items
    }
    if ( change.added.isNotEmpty() ) {
        // Act on data added.
    }
}

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val added: List<E>

The items added to the ObservableList.

Link copied to clipboard
abstract val from: Int

The index within the ObservableList where this change occurred.

Link copied to clipboard
abstract val removed: List<E>

The items removed from the ObservableList.

Functions

Link copied to clipboard
abstract fun isAddition(): Boolean

Return true iff no items were removed, but some were added.

Link copied to clipboard
abstract fun isRemoval(): Boolean

Return true iff no items were added, and some were removed.

Link copied to clipboard
abstract fun isReplacement(): Boolean

Returns true iff the same number of items were added and removed.