tornadofx / tornadofx / ListConversionListener

ListConversionListener

class ListConversionListener<SourceType, TargetType> : ListChangeListener<SourceType>, WeakListener

Listens to changes on a list of SourceType and keeps the target list in sync by converting each object into the TargetType via the supplied converter.

Constructors

<init> ListConversionListener(targetList: MutableList<TargetType>, converter: (SourceType) -> TargetType)

Listens to changes on a list of SourceType and keeps the target list in sync by converting each object into the TargetType via the supplied converter.

Properties

converter val converter: (SourceType) -> TargetType

Functions

equals fun equals(other: Any?): Boolean
hashCode fun hashCode(): Int
onChanged fun onChanged(change: Change<out SourceType>): Unit
wasGarbageCollected fun wasGarbageCollected(): Boolean

Extension Functions

getProperty fun <T> Any.getProperty(prop: KMutableProperty1<*, T>): ObjectProperty<T>
observable fun <T : Any> Any.observable(propName: String): ObjectProperty<T>