javafx.beans.property.Property.unbind()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(123)

本文整理了Java中javafx.beans.property.Property.unbind()方法的一些代码示例,展示了Property.unbind()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Property.unbind()方法的具体详情如下:
包路径:javafx.beans.property.Property
类名称:Property
方法名:unbind

Property.unbind介绍

暂无

代码示例

代码示例来源:origin: pmd/pmd

/** 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
}

代码示例来源:origin: org.codehaus.griffon/griffon-javafx

@Override
public void unbind() {
  delegate.unbind();
}

代码示例来源:origin: com.speedment.tool/tool-config

@Override
public void unbind() {
  wrapped.unbind();
}

代码示例来源:origin: org.fxmisc.easybind/easybind

@Override
public void unbind() {
  Property<U> target = getTargetObservable();
  if(target != null) {
    target.unbind();
  }
  boundTo = null;
}

代码示例来源:origin: org.fxmisc.easybind/easybind

@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();
  }
}

代码示例来源:origin: org.fxmisc.easybind/easybind

@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;
    }
  }
}

代码示例来源:origin: org.fxmisc.easybind/easybind

@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);
}

代码示例来源:origin: org.fxmisc.richtext/richtextfx

@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();
  }
};

相关文章