List of usage examples for javafx.beans.value ObservableBooleanValue addListener
void addListener(ChangeListener<? super T> listener);
From source file:com.eviware.loadui.ui.fx.util.NodeUtils.java
public static void bindStyleClass(@Nonnull final Node nodeToStyle, @Nonnull final String styleClass, ObservableBooleanValue value) { updateStyleClasses(nodeToStyle, styleClass, value.getValue()); value.addListener(new ChangeListener<Boolean>() { @Override//from w w w. j a v a 2 s . c o m public void changed(ObservableValue<? extends Boolean> arg0, Boolean oldValue, Boolean newValue) { updateStyleClasses(nodeToStyle, styleClass, newValue); } }); }