Ruckus
06/26/2018, 3:44 PMclass InputDelay : View("Input Delay") {
override val root = vbox {
val status = label("0 characters (updated 0 times)")
textarea {
var updates = 0
val timer = PauseTransition(0.5.seconds)
timer.setOnFinished { status.text = "${text?.length ?: 0} characters (updated ${++updates} times)" }
textProperty().onChange { timer.playFromStart() }
}
}
}