tornadofx / tornadofx / BindingAwareSimpleSetProperty


class BindingAwareSimpleSetProperty<T> : SimpleSetProperty<T>


<init> BindingAwareSimpleSetProperty(viewModel: ViewModel, name: String?)


bind fun bind(newObservable: ObservableValue<out ObservableSet<T>>?): Unit
bindContentBidirectional fun bindContentBidirectional(list: ObservableSet<T>?): Unit
equals fun equals(other: Any?): Boolean
hashCode fun hashCode(): Int

Return a unique id for this object instead of the default hashCode which is dependent on the children. Without this override we wouldnt be able to identify the facade in our internal maps.

recordBinding fun recordBinding(observableValue: Observable?): Unit

Extension Properties

isDirty val <T> Property<T>.isDirty: Boolean

Check if a given property from the ViewModel is dirty. This is a shorthand form of:

isNotDirty val <T> Property<T>.isNotDirty: Boolean
viewModel val Property<*>.viewModel: ViewModel?

Extract the ViewModel from a property that is bound towards a ViewModel Facade

viewModelFacade val ObservableValue<*>.viewModelFacade: Property<*>?

Extract the ViewModel Facade from a property that is bound towards it

Extension Functions

addValidator fun <T> Property<T>.addValidator(node: Node, trigger: ValidationTrigger = ValidationTrigger.OnChange(), validator: ValidationContext.(T?) -> ValidationMessage?): <ERROR CLASS>

Add the given validator to a property that resides inside a ViewModel. The supplied node will be decorated by the current decorationProvider for this context inside the ViewModel of the property if validation fails.

animate fun <T> WritableValue<T>.animate(endValue: T, duration: Duration, interpolator: Interpolator? = null, op: Timeline.() -> Unit = {}): Unit
asObservable fun <T> Set<T>.asObservable(): ObservableSet<T>

Returns a new ObservableSet that is backed by the original set.

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

Returns an unmodifiable ObservableSet that wraps the original set.

assignIfNull fun <T> WritableValue<T>.assignIfNull(creator: () -> T): Unit

Assign the value from the creator to this WritableValue if and only if it is currently null

awaitUntil fun <T> ObservableValue<T>.awaitUntil(condition: (T) -> Boolean): Unit

Wait on the UI thread until a certain value is available on this observable.

booleanBinding fun <T> ObservableValue<T>.booleanBinding(vararg dependencies: Observable, op: (T?) -> Boolean): BooleanBinding
cleanBind fun <T> Property<T>.cleanBind(observable: ObservableValue<T>): Unit

Binds this property to an observable, automatically unbinding it before if already bound.

contains fun <T : Node> Iterable<T>.contains(cmp: UIComponent): <ERROR CLASS>
doubleBinding fun <T> ObservableValue<T>.doubleBinding(vararg dependencies: Observable, op: (T?) -> Double): DoubleBinding
floatBinding fun <T> ObservableValue<T>.floatBinding(vararg dependencies: Observable, op: (T?) -> Float): FloatBinding
getProperty fun <T> Any.getProperty(prop: KMutableProperty1<*, T>): ObjectProperty<T>
getValue operator fun <T> ObservableValue<T>.getValue(thisRef: Any, property: KProperty<*>): T
integerBinding fun <T> ObservableValue<T>.integerBinding(vararg dependencies: Observable, op: (T?) -> Int): IntegerBinding
longBinding fun <T> ObservableValue<T>.longBinding(vararg dependencies: Observable, op: (T?) -> Long): LongBinding
mapEach fun <T, R> Iterable<T>.mapEach(action: T.() -> R): <ERROR CLASS>

map with the element as receiver.

mapEachTo fun <T, R, C : MutableCollection<in R>> Iterable<T>.mapEachTo(destination: C, action: T.() -> R): <ERROR CLASS>

mapTo with the element as receiver.

markDirty fun Property<*>.markDirty(): Unit?

Mark this ViewModel facade property as dirty in its owning ViewModel.

mutateOnChange fun <T> Property<T>.mutateOnChange(mutator: (T?) -> T?): <ERROR CLASS>

Listen to changes and update the value of the property if the given mutator results in a different value

objectBinding fun <T, R> ObservableValue<T>.objectBinding(vararg dependencies: Observable, op: (T?) -> R?): Binding<R?>
observable fun <T : Any> Any.observable(propName: String): ObjectProperty<T>
observable fun <T> Set<T>.observable(): ObservableSet<T>
onChange fun <T> ObservableValue<T>.onChange(op: (T?) -> Unit): <ERROR CLASS>
onChangeOnce fun <T> ObservableValue<T>.onChangeOnce(op: (T?) -> Unit): Unit
onChangeTimes fun <T> ObservableValue<T>.onChangeTimes(times: Int, op: (T?) -> Unit): Unit

Listen for changes to this observable. Optionally only listen x times. The lambda receives the changed value when the change occurs, which may be null,

select fun <T, N> ObservableValue<T>.select(nested: (T) -> ObservableValue<N>): Property<N>
selectBoolean fun <T> ObservableValue<T>.selectBoolean(nested: (T) -> BooleanExpression): BooleanExpression
setValue operator fun <T> Property<T>.setValue(thisRef: Any, property: KProperty<*>, value: T?): Unit
stringBinding fun <T> ObservableValue<T>.stringBinding(vararg dependencies: Observable, op: (T?) -> String?): StringBinding
toJSON fun <T : JsonModel> Iterable<T>.toJSON(): <ERROR CLASS>
toObservable fun <T> Set<T>.toObservable(): ObservableSet<T>

Returns a new ObservableSet with the elements from the original set.

withEach fun <T> Iterable<T>.withEach(action: T.() -> Unit): <ERROR CLASS>

forEach with the element as receiver.