change.getRemoved() .forEach(val -> branch.getChildren() .removeIf(item -> val.equals(item.getValue())) );
/** * Remove all ship icons from the sea map. */ public void removeShipIcons() { shipCanvas.getChildren().removeIf(node -> node instanceof ShipIcon); }
private void clearLines() { shipCanvas.getChildren().removeIf(node -> node instanceof Shape); }
public boolean removeDockable(FXDockableEntry dockableEntry) { if (containsDockable(dockableEntry)) { dockableSet.remove(dockableEntry); dockables.removeIf(adapter -> adapter.getAdapted().equals(dockableEntry)); return true; } else { return false; } }
public static void setupURITextField(TextField textField) { textField.textProperty().addListener((observable, oldValue, newValue) -> { if (newValue!=null){ try { URI uri = new URI(newValue); textField.getStyleClass().removeIf("error"::equals); } catch (URISyntaxException e) { textField.getStyleClass().add("error"); } } }); }
public static void setupLocalTimeTextField(TextField textField) { textField.textProperty().addListener((observable, oldValue, newValue) -> { if (newValue!=null){ try { TIME_FORMAT.parse(newValue); textField.getStyleClass().removeIf("error"::equals); } catch (DateTimeParseException e) { textField.getStyleClass().add("error"); } } }); } }
private void handlePathModification(Kind k, Path p) { switch (k) { case CREATE: if (! this.children.stream().filter(i -> i.getNativeResourceObject().equals(p)) .findFirst().isPresent()) { this.children .add(Files.isDirectory(p) ? new DirPathItemImpl(p, this.observe) : new FileItemImpl(p)); } break; case DELETE: this.children.removeIf(i -> i.getNativeResourceObject().equals(p)); break; case MODIFY: this.children.stream().filter(i -> i.getNativeResourceObject().equals(p)) .findFirst().ifPresent(i -> i.refresh()); break; default: break; } }
private void handlePathModification(Kind k, Path p) { switch (k) { case CREATE: if (! this.children.stream().filter(i -> i.getNativeResourceObject().equals(p)) .findFirst().isPresent()) { this.children .add(Files.isDirectory(p) ? new DirPathItemImpl(p, this.observe) : new FileItemImpl(p)); } break; case DELETE: this.children.removeIf(i -> i.getNativeResourceObject().equals(p)); break; case MODIFY: this.children.stream().filter(i -> i.getNativeResourceObject().equals(p)) .findFirst().ifPresent(i -> i.refresh()); break; default: break; } }
@Override protected void updateChildren() { super.updateChildren(); getChildren().removeIf(node -> node.getStyleClass().contains("box")); if (rippler != null) { getChildren().add(rippler); } }
public static void setupLocalDateTextField(TextField textField) { textField.textProperty().addListener((observable, oldValue, newValue) -> { DateTimeFormatter dtf = new DateTimeFormatterBuilder().appendLocalized(FormatStyle.SHORT, null).toFormatter(Locale.getDefault()); if (newValue!=null){ try { dtf.parse(newValue); textField.getStyleClass().removeIf("error"::equals); } catch (DateTimeParseException e) { textField.getStyleClass().add("error"); } } }); }
node.getStyleClass().removeIf(c -> c.equals("error")); node.setOnMouseEntered(null); node.setOnMouseExited(null);
root.getChildren().removeIf( t -> c.getRemoved().contains(t.getValue()));
root.getChildren().removeIf( t -> c.getRemoved().contains(t.getValue()));
this.buttonArea.getChildren().removeIf(b -> c.getRemoved().contains(b.getUserData()));
this.buttonArea.getChildren().removeIf(b -> c.getRemoved().contains(b.getUserData()));
getContent().removeIf(node -> node instanceof VBox); initializeContent(itemNavigator); });