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

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

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

ObservableList.removeAll介绍

暂无

代码示例

代码示例来源:origin: jfoenixadmin/JFoenix

public void removeColorSelectionNode(Node... nodes) {
  colorNodes.removeAll(nodes);
}

代码示例来源:origin: jfoenixadmin/JFoenix

private void clear(Text text) {
    final List<Rectangle> rectangles = boxes.get(text);
    if(rectangles != null && !rectangles.isEmpty())
      Platform.runLater(() -> getParentChildren(parent).removeAll(rectangles));
  }
}

代码示例来源:origin: jfoenixadmin/JFoenix

/**
 * clear highlights
 */
public synchronized void clear() {
  List<Rectangle> flatBoxes = new ArrayList<>();
  final Collection<List<Rectangle>> boxesCollection = boxes.values();
  for (List<Rectangle> box : boxesCollection) {
    flatBoxes.addAll(box);
  }
  boxes.clear();
  if(parent!=null) JFXUtilities.runInFX(()-> getParentChildren(parent).removeAll(flatBoxes));
}

代码示例来源:origin: jfoenixadmin/JFoenix

lock.lock();
if (groupOrder.size() > 0) {
  groupOrder.removeAll(treeTableColumns);
  List<TreeTableColumn<S, ?>> grouped = new ArrayList<>();
  grouped.addAll(groupOrder);

代码示例来源:origin: jfoenixadmin/JFoenix

getChildren().clear();
} else {
  getChildren().removeAll(removedItems);
  originalItems.removeAll(removedItems);

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

private ASTTreeItem(Node n) {
  super(n);
  setExpanded(true);
  treeCellProperty().changes().subscribe(change -> {
    if (change.getOldValue() != null) {
      change.getOldValue().getStyleClass().removeAll(latentStyleClasses.getValue());
    }
    if (change.getNewValue() != null) {
      change.getNewValue().getStyleClass().addAll(latentStyleClasses.getValue());
    }
  });
  latentStyleClasses.changes()
           // .conditionOn(treeCellProperty().map(Objects::nonNull))
           .subscribe(change -> {
             if (treeCellProperty().isPresent()) {
               treeCellProperty().getValue().getStyleClass().removeAll(change.getOldValue());
               treeCellProperty().getValue().getStyleClass().addAll(change.getNewValue());
             }
           });
}

代码示例来源:origin: torakiki/pdfsam

/**
 * the field is marked with the class "invalid" when the validation status is invalid to give the user visual feedback.
 */
public void setEnableInvalidStyle(final boolean active) {
  validationSupport.validationStateProperty().addListener(o -> {
    if (active) {
      if (validationSupport.validationStateProperty().get() == ValidationState.INVALID) {
        getStyleClass().addAll(Style.INVALID.css());
      } else {
        getStyleClass().removeAll(Style.INVALID.css());
      }
    }
  });
}

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

@SafeVarargs
@Override
public final boolean removeAll(E... elements) {
  return delegate.removeAll(elements);
}

代码示例来源:origin: torakiki/pdfsam

List<SelectionTableRowData> toMove = dragged.stream().map(getItems()::get)
    .filter(Objects::nonNull).collect(Collectors.toList());
getItems().removeAll(toMove);

代码示例来源:origin: torakiki/pdfsam

public BrowsableField() {
  HBox.setHgrow(textField, Priority.ALWAYS);
  this.getStyleClass().add("browsable-field");
  validableContainer = new HBox(textField);
  validableContainer.getStyleClass().add("validable-container");
  textField.getStyleClass().add("validable-container-field");
  browseButton = new Button(DefaultI18nContext.getInstance().i18n("Browse"));
  browseButton.getStyleClass().addAll(Style.BROWSE_BUTTON.css());
  browseButton.prefHeightProperty().bind(validableContainer.heightProperty());
  browseButton.setMaxHeight(USE_PREF_SIZE);
  browseButton.setMinHeight(USE_PREF_SIZE);
  HBox.setHgrow(validableContainer, Priority.ALWAYS);
  textField.validProperty().addListener((o, oldValue, newValue) -> {
    if (newValue == ValidationState.INVALID) {
      validableContainer.getStyleClass().addAll(Style.INVALID.css());
    } else {
      validableContainer.getStyleClass().removeAll(Style.INVALID.css());
    }
  });
  textField.focusedProperty().addListener(
      (o, oldVal, newVal) -> validableContainer.pseudoClassStateChanged(SELECTED_PSEUDOCLASS_STATE, newVal));
  getChildren().addAll(validableContainer, browseButton);
}

代码示例来源:origin: torakiki/pdfsam

BookmarksLevelComboBox() {
  validationSupport.setValidator(Validators.alwaysFalse());
  setEditable(true);
  getSelectionModel().selectFirst();
  valueProperty().addListener((o, oldVal, newVal) -> validate());
  validationSupport.validationStateProperty().addListener(o -> {
    if (validationSupport.validationStateProperty().get() == ValidationState.INVALID) {
      getEditor().getStyleClass().addAll(Style.INVALID.css());
    } else {
      getEditor().getStyleClass().removeAll(Style.INVALID.css());
    }
  });
  getEditor().focusedProperty().addListener((obs, old, isFocused) -> {
    // workaround for https://bugs.openjdk.java.net/browse/JDK-8136838
    if (!isFocused) {
      String newVal = getEditor().getText();
      if (nonNull(newVal) && !newVal.equals(getValue())) {
        setValue(newVal);
      }
    }
  });
}

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

/** {@inheritDoc} */
  @Override public void removeDecoration(Node targetNode) {
    targetNode.getStyleClass().removeAll(styleClasses);
  }
}

代码示例来源:origin: com.jfoenix/jfoenix

private void clear(Text text) {
    final List<Rectangle> rectangles = boxes.get(text);
    if(rectangles != null && !rectangles.isEmpty())
      Platform.runLater(() -> getParentChildren(parent).removeAll(rectangles));
  }
}

代码示例来源:origin: org.jrebirth.af.showcase/todos

/**
   * @return the pSourcePath
   */
  public TodoList removeTodo(org.jrebirth.af.showcase.todos.bean.Todo... todo) {
    if (pTodo != null) {
      pTodo.removeAll(Arrays.asList(todo));
    } else {
      todo().removeAll(Arrays.asList(todo));
    }
    return this;
  }
}

代码示例来源:origin: com.github.vatbub/common.view.tagarea

/**
 * Removes all tags from this tag area
 */
public void clearAllTags() {
  this.getChildren().removeAll(getTags());
}

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

@Override
  public void detachFrom(@Nonnull TableView<E> tableView) {
    requireNonNull(tableView, ERROR_TABLE_VIEW_NULL);
    tableView.setItems(FXCollections.emptyObservableList());
    tableView.getColumns().removeAll(columns);
  }
}

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

@Override
  public void detachFrom(@Nonnull TableView<E> tableView) {
    requireNonNull(tableView, ERROR_TABLE_VIEW_NULL);
    tableView.setItems(FXCollections.<E>emptyObservableList());
    tableView.getColumns().removeAll(columns);
  }
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

/**
 * Constructor
 */
public SimpleButton() {
 super();
 button = new JFXButton();
 button.addEventFilter(ActionEvent.ACTION, this::handle);
 button.setCursor(Cursor.HAND);
 button.getStyleClass().removeAll("button");
 button.getStyleClass().add("ep-button");
}

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

private void changeSceneUnwrapped() {
  closeDialog();
  stack.getChildren().removeAll(imgView);
  if (currentScene.get() == EScene.SEAMAP) {
    setUpSeamapImageView();
  } else {
    setUpImageView();
  }
  stack.getChildren().add(imgView);
}

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

@Override
  public void onChanged(Change<? extends String> c) {
    while(c.next()) {
      if (c.wasRemoved()) {
        styleable.getStyleClass().removeAll(c.getRemoved());
      }
      if (c.wasAdded()) {
        styleable.getStyleClass().addAll(c.getAddedSubList());
      }
    }
  }
});

相关文章