Skip to content

Instantly share code, notes, and snippets.

View prule's full-sized avatar

Paul Rule prule

View GitHub Profile
@prule
prule / gist:5061164
Created February 28, 2013 23:46
Griffon/JavaFX - Adding a change listener to a text field Part 3 - reusing the closure across multiple text fields
import javafx.beans.value.ChangeListener
import javafx.beans.value.ObservableValue
import org.apache.commons.lang.StringUtils
// model
@FXBindable String amount1
@FXBindable String amount2
// view
textField(id: 'amount1', text: bind(model.amount1Property))
@prule
prule / gist:5061107
Last active December 14, 2015 08:58
Griffon/JavaFX - Adding a change listener to a text field Part 2
import javafx.beans.value.ChangeListener
import javafx.beans.value.ObservableValue
import org.apache.commons.lang.StringUtils
// model
@FXBindable String amount1
// view
textField(id: 'amount1', text: bind(model.amount1Property))
@prule
prule / gist:5061089
Last active June 21, 2019 04:41
Griffon/JavaFX - Adding a change listener to a text field Part 1
import javafx.beans.value.ChangeListener
import javafx.beans.value.ObservableValue
import org.apache.commons.lang.StringUtils
// model
@FXBindable String amount1
// view
textField(id: 'amount1', text: bind(model.amount1Property))