/** Like rewireInit, with no initialisation. */ public static <T> void rewire(Property<T> underlying, ObservableValue<? extends T> source) { underlying.unbind(); underlying.bind(source); // Bindings are garbage collected after the popup dies }
@Override public void unbind() { delegate.unbind(); }
@Override public void unbind() { wrapped.unbind(); }
@Override public void unbind() { Property<U> target = getTargetObservable(); if(target != null) { target.unbind(); } boundTo = null; }
@Override public void changed(ObservableValue<? extends Boolean> cond, Boolean wasTrue, Boolean isTrue) { Property<T> tgt = this.target.get(); if(tgt == null) { condition.removeListener((ChangeListener<Boolean>) this); } else if(isTrue) { tgt.bind(source); } else { tgt.unbind(); } }
@Override public void unsubscribe() { if(!unsubscribed) { condition.removeListener((ChangeListener<Boolean>) this); Property<T> tgt = this.target.get(); if(tgt != null) { tgt.removeListener(this); tgt.unbind(); } unsubscribed = true; } } }
@Override protected Subscription observeTargetObservable(Property<U> mapped) { if(boundTo != null) { mapped.bind(boundTo); } Subscription s1 = super.observeTargetObservable(mapped); Subscription s2 = () -> { if(boundTo != null) { mapped.unbind(); if(resetOnUnbind) { mapped.setValue(resetTo); } } }; return s1.and(s2); }
@Override public void dispose() { box.highlightTextFillProperty().unbind(); box.wrapTextProperty().unbind(); box.graphicFactoryProperty().unbind(); box.graphicOffset.unbind(); firstParPseudoClass.unsubscribe(); lastParPseudoClass.unsubscribe(); caretSubscription.unsubscribe(); hasCaretPseudoClass.unsubscribe(); selectionSubscription.unsubscribe(); } };