javafx.collections.ObservableList.removeListener()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(163)

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

ObservableList.removeListener介绍

暂无

代码示例

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

public void unobserve(ObservableList<Node> nodes) {
  nodes.removeListener(this);
}

代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls

@Override
  public void dispose() {
    sourceList.removeListener(l);
  }
};

代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls

@Override
  public void dispose() {
    a.removeListener(aChange);
  }
};

代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls

@Override
  public void dispose() {
    sourceList.removeListener(l);
  }
};

代码示例来源:origin: org.drombler.commons/drombler-commons-fx-docking

@Override
public void close() {
  splitPane.getDividers().removeListener(dividerListener);
  removeDividerPositionChangeListeners();
}

代码示例来源:origin: org.javafxdata/datafx-ui

@Override
  public void invalidated(Observable o) {
    if (!table.getItems().isEmpty()) {
      createColumns(table);
      // remove listener
      items.removeListener(this);
    }
  }
};

代码示例来源:origin: org.reactfx/reactfx

@Override
  protected Subscription subscribeToInputs() {
    ListChangeListener<T> listener = c ->  {
      while(c.next()) {
        emit(TransientListChange.fromCurrentStateOf(c));
      }
    };
    list.addListener(listener);
    return () -> list.removeListener(listener);
  }
};

代码示例来源:origin: org.drombler.commons/drombler-commons-docking-fx

@Override
public void close() {
  splitPane.getDividers().removeListener(dividerListener);
  removeDividerPositionChangeListeners();
}

代码示例来源:origin: io.datafx/ui

@Override
  public void invalidated(Observable o) {
    if (!table.getItems().isEmpty()) {
      createColumns(table);
      // remove listener
      items.removeListener(this);
    }
  }
};

代码示例来源:origin: org.javafxdata/datafx-cell

@Override
  public void invalidated(Observable o) {
    if (!table.getItems().isEmpty()) {
      createColumns(table);
      // remove listener
      items.removeListener(this);
    }
  }
};

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

@Override
public void dispose() {
  source.forEach(elem -> elem.removeListener(weakElemListener));
  source.removeListener(weakListListener);
}

代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls

private void styleStringChanged(
    ObservableValue<? extends StyledString> observable,
    StyledString oldValue, StyledString newValue) {
  if (oldValue != null) {
    oldValue.getSegmentList().removeListener(this::segmentsChanged);
  }
  if (newValue != null) {
    newValue.getSegmentList().addListener(this::segmentsChanged);
  }
}

代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls

private void styleStringChanged(
    ObservableValue<? extends StyledString> observable,
    StyledString oldValue, StyledString newValue) {
  if (oldValue != null) {
    oldValue.getSegmentList().removeListener(this::segmentsChanged);
  }
  if (newValue != null) {
    newValue.getSegmentList().addListener(this::segmentsChanged);
  }
}

代码示例来源:origin: org.tentackle/tentackle-fx

/**
 * Unbinds the table.
 */
protected void unbind() {
 if (boundTable != null) {
  boundTable.setTotalsTableView(null);
  boundTable.getColumns().removeListener(columnListener);
 }
 getColumns().clear();
}

代码示例来源:origin: io.reactivex.rxjava2/rxjavafx

public static <T> Observable<ObservableList<T>> fromObservableList(final ObservableList<T> source) {
  return Observable.create((ObservableOnSubscribe<ObservableList<T>>) subscriber -> {
    ListChangeListener<T> listener = c -> subscriber.onNext(source);
    source.addListener(listener);
    subscriber.setDisposable(JavaFxSubscriptions.unsubscribeInEventDispatchThread(() -> source.removeListener(listener)));
  }).startWith(source).subscribeOn(JavaFxScheduler.platform());
}

代码示例来源:origin: io.reactivex/rxjavafx

public static <T> Observable<ObservableList<T>> fromObservableList(final ObservableList<T> source) {
  return Observable.create((ObservableOnSubscribe<ObservableList<T>>) subscriber -> {
    ListChangeListener<T> listener = c -> subscriber.onNext(source);
    source.addListener(listener);
    subscriber.setDisposable(JavaFxSubscriptions.unsubscribeInEventDispatchThread(() -> source.removeListener(listener)));
  }).startWith(source).subscribeOn(JavaFxScheduler.platform());
}

代码示例来源:origin: org.drombler.commons/drombler-commons-docking-fx

@Override
  public void close() {
    dockingSplitPane.getDockingSplitPaneChildren().removeListener(dockingSplitPaneChildrenListener);
    dockingSplitPane.widthProperty().removeListener(widthChangeListener);
    dockingSplitPane.heightProperty().removeListener(heightChangeListener);
  }
}

代码示例来源:origin: org.drombler.commons/drombler-commons-fx-docking

@Override
  public void close() {
    dockingSplitPane.getDockingSplitPaneChildren().removeListener(dockingSplitPaneChildrenListener);
    dockingSplitPane.widthProperty().removeListener(sizeChangeListener);
    dockingSplitPane.heightProperty().removeListener(sizeChangeListener);
    dockingSplitPane.layoutConstraintsProperty().removeListener(sizeChangeListener);
  }
}

代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls

@Override
public void dispose() {
  getSkinnable().getStyleString().getSegmentList()
      .removeListener(this::segmentsChanged);
  getSkinnable().styledStringProperty().removeListener(
      this::styleStringChanged);
  Bindings.unbindContent(this.l.getStyleClass(), getSkinnable().getStyleClass());
  super.dispose();
}

代码示例来源:origin: org.controlsfx/controlsfx

public void updateGridViewItems() {
  if (getSkinnable().getItems() != null) {
    getSkinnable().getItems().removeListener(weakGridViewItemsListener);
  }
  if (getSkinnable().getItems() != null) {
    getSkinnable().getItems().addListener(weakGridViewItemsListener);
  }
  updateItemCount();
  ReflectionUtils.recreateCells(flow);
  getSkinnable().requestLayout();
}

相关文章