use of javafx.beans.property.BooleanPropertyBase in project jabref by JabRef.
the class BindingsHelper method includePseudoClassWhen.
public static void includePseudoClassWhen(Node node, PseudoClass pseudoClass, ObservableValue<? extends Boolean> condition) {
BooleanProperty pseudoClassState = new BooleanPropertyBase(false) {
@Override
protected void invalidated() {
node.pseudoClassStateChanged(pseudoClass, get());
}
@Override
public Object getBean() {
return node;
}
@Override
public String getName() {
return pseudoClass.getPseudoClassName();
}
};
pseudoClassState.bind(condition);
}
Aggregations