tornadofx / tornadofx / removeWhen

removeWhen

fun <T : Node> T.removeWhen(expr: () -> ObservableValue<Boolean>): T

This extension function will make sure that the given node will only be visible in the scene graph, if the given expr returning an observable boolean value equals true.

fun <T : Node> T.removeWhen(predicate: ObservableValue<Boolean>): <ERROR CLASS>

This extension function will make sure that the given node will only be visible in the scene graph, if the given predicate observable boolean value equals true.