tornadofx / tornadofx / javafx.scene.Node / replaceWith

replaceWith

fun Node.replaceWith(replacement: Node, transition: ViewTransition? = null, sizeToScene: Boolean = false, centerOnScreen: Boolean = false, onTransit: () -> Unit = {}): Boolean

Replace this Node with another, optionally using a transition animation.

Parameters

replacement - The node that will replace this one

transition - The ViewTransition used to animate the transition

Return
Whether or not the transition will run

fun Node.replaceWith(replacement: Node, transition: ViewTransition? = null, sizeToScene: Boolean, onTransit: () -> Unit = {}): Boolean
Deprecated: This will go away in the future. Use the version with centerOnScreen parameter