ObservableList
A list, which can be observed by ListChangeListeners and InvalidationListeners.
Note, the collection names in Glok use Kotlin's naming convention. So an ObservableList is not mutable, whereas MutableObservableList is mutable.
Comparing Glok with JavaFX :
Glok : ObservableList -> JavaFX : ReadOnlyObservableList
Glok : MutableObservableList -> JavaFX : ObservableList
Class Diagram
╭╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮
╭╌╌╌╌╌╌╌╌╌╌╌╮ ┆ Observable ┆ ╭╌╌╌╌╌╌╌╌╌╌╌╌╌╮
┌─────────────────────▶┆ List ┆ ┆ addListener() ┆ ┆ObservableInt┆
│ ╰╌╌╌╌╌╌╌╌╌╌╌╯ ┆ removeListener() ┆ ╰╌╌╌╌╌╌╌╌╌╌╌╌╌╯
│ △ ╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ △
│ │ △ │
│ ┌───────────┴──────────────────┐ │ │
│ │ ╭╌╌╌╌╌╌┴╌╌╌╌╌┴╌╌╌╌╌╌╌╌╌╌╮ ┏━━━━━━━━┷━━━━━━━━━┓
│ ╭╌╌╌╌┴╌╌╌╌╌╌╮ ┆ ObservableList ┆ ┃ObservableListSize┃
│ ┌───────▶┆MutableList┆ ┆ addChangeListener() ┆◀──────┨ ┃
│ │ ╰╌╌╌╌╌╌╌╌╌╌╌╯ ┆ removeChangeListener()┆ ┃ ┃
│ │ △ ╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ ┗━━━━━━━━━━━━━━━━━━┛
│ │ │ △
│ │ │ │
│ │ │ ┌─────────────────────────────┴──┬─────────────────────────────┐
│ │ │ │ │ │
│ │ ╭╌╌╌╌╌╌╌╌╌╌┴╌╌╌╌╌╌┴╌╌╌╮ ┏━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━┓ ┏━━━━━━━━━┷━━━━━━━━━┓
│ │ ┆MutableObservableList┆ ┃ReadOnlyObservableListWrapper┃ ┃EmptyObservableList┃
│ │ ┆ ┆ ┃ actual : List ┃ ┃ ┃
│ │ ┆ ┆ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━┛
│ │ ╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ ┃ ┠────────────────────┐
│ │ △ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ │
│ │ │ │
│ │ │ │
│ │ ┏━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┓ ┌──────────────────────────┐ ┌───────────────────┐ │
│ │ ┃MutableObservableListWrapper┃ │ ListChangeListener │ │ ListChange │ │
│ └─┨ actual : MutableList ┃◇──┤ │ │ from : Int │ │
│ ┃ ┃ │ changed(List)│ │ added : List │ │
│ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ └──────────────────────────┘ │ removed : List │ │
│ │ isAddition() │ │
│ │ isRemoval() │ │
│ │ isReplacement() │ │
│ └───────────────────┘ │
│ │
└───────────────────────────────────────────────────────────────────────────────────────────┘
Content copied to clipboard
Created with Blokart
Inheritors
Functions
Link copied to clipboard
open fun addChangeListener(lambda: (list: ObservableList<E>, change: ListChange<E>) -> Unit): ListChangeListener<E>
Link copied to clipboard
open fun addWeakChangeListener(lambda: (list: ObservableList<E>, change: ListChange<E>) -> Unit): ListChangeListener<E>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard