diff --git a/src/main/java/org/jabref/gui/util/BindingsHelper.java b/src/main/java/org/jabref/gui/util/BindingsHelper.java index 716ca03b899a..f2618aebb2ba 100644 --- a/src/main/java/org/jabref/gui/util/BindingsHelper.java +++ b/src/main/java/org/jabref/gui/util/BindingsHelper.java @@ -20,6 +20,7 @@ import javafx.collections.ObservableMap; import javafx.css.PseudoClass; import javafx.scene.Node; +import org.fxmisc.easybind.EasyBind; /** @@ -41,23 +42,7 @@ public static BooleanBinding all(ObservableList source, Predicate pred } public static void includePseudoClassWhen(Node node, PseudoClass pseudoClass, ObservableValue 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); + condition.addListener((obs, oldValue, newValue) -> node.pseudoClassStateChanged(pseudoClass,newValue)); } /**