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

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

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

ObservableList.setAll介绍

暂无

代码示例

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

/**
 * will change the decorator content
 *
 * @param content
 */
public void setContent(Node content) {
  this.contentPlaceHolder.getChildren().setAll(content);
}

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

@Override
  public void restore(Pane node) {
    ArrayList<Node> children = cache.remove(node);
    if (children != null) {
      node.getChildren().setAll(children);
    }
  }
};

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

/**
 * set header node
 *
 * @param titleContent
 */
public void setHeading(Node... titleContent) {
  this.heading.getChildren().setAll(titleContent);
}

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

/**
 * set actions of the dialog (Accept, Cancel,...)
 *
 * @param actions
 */
public void setActions(Node... actions) {
  this.actions.getChildren().setAll(actions);
}

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

/***************************************************************************
 *                                                                         *
 * Setters / Getters                                                       *
 *                                                                         *
 **************************************************************************/
public void setLeftItems(Node... nodes) {
  this.leftBox.getChildren().setAll(nodes);
}

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

/**
 * set body node
 *
 * @param body
 */
public void setBody(Node... body) {
  this.body.getChildren().setAll(body);
}

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

public void setSidePane(Node... sidePane) {
  this.sidePane.getChildren().setAll(sidePane);
}

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

/**
 * set the content of the dialog
 *
 * @param content
 */
public void setContent(Region content) {
  if (content != null) {
    this.content = content;
    this.content.setPickOnBounds(false);
    contentHolder.getChildren().setAll(content);
  }
}

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

private void initialize() {
  this.getStyleClass().setAll(DEFAULT_STYLE_CLASS);
  this.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
}

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

public void setContent(Node... content) {
  this.content.getChildren().setAll(content);
  if (contentHolder.getChildren().isEmpty()) {
    updateContent();
  }
}

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

private void updateContent() {
  Node newContent = tab.getContent();
  if (newContent == null) {
    getChildren().clear();
  } else {
    getChildren().setAll(newContent);
  }
}

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

public void initialize() {
  track = new StackPane();
  track.getStyleClass().setAll("track");
  bar = new StackPane();
  bar.getStyleClass().setAll("bar");
  secondaryBar = new StackPane();
  secondaryBar.getStyleClass().setAll("secondary-bar");
  clip = new Region();
  clip.setBackground(new Background(new BackgroundFill(Color.BLACK, CornerRadii.EMPTY, Insets.EMPTY)));
  bar.backgroundProperty().addListener(observable -> JFXNodeUtils.updateBackground(bar.getBackground(), clip));
  getChildren().setAll(track, secondaryBar, bar);
}

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

/**
 * creates empty dialog layout
 */
public JFXDialogLayout() {
  initialize();
  heading.getStyleClass().addAll("jfx-layout-heading", "title");
  body.getStyleClass().add("jfx-layout-body");
  VBox.setVgrow(body, Priority.ALWAYS);
  actions.getStyleClass().add("jfx-layout-actions");
  getChildren().setAll(heading, body, actions);
}

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

public JFXAutoCompletePopup() {
  super();
  bridge = new CSSBridge();
  getContent().setAll(bridge);
  setAutoFix(true);
  setAutoHide(true);
  setHideOnEscape(true);
  getStyleClass().add(DEFAULT_STYLE_CLASS);
}

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

private void closeDialog() {
  resetProperties();
  Event.fireEvent(JFXDialog.this, new JFXDialogEvent(JFXDialogEvent.CLOSED));
  if (tempContent == null) {
    dialogContainer.getChildren().remove(this);
  } else {
    dialogContainer.getChildren().setAll(tempContent);
  }
}

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

public void setContent(Node content) {
  if (contentContainer.getChildren().size() == 2) {
    contentContainer.getChildren().set(1, content);
  } else if (contentContainer.getChildren().size() == 1) {
    contentContainer.getChildren().add(content);
  } else {
    contentContainer.getChildren().setAll(headerSpace, content);
  }
  VBox.setVgrow(content, Priority.ALWAYS);
}

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

private void show(SnackbarEvent event) {
  content.getChildren().setAll(event.getContent());
  openAnimation = getTimeline(event.getTimeout());
  if (event.getPseudoClass() != null) {
    activePseudoClass = event.getPseudoClass();
    content.pseudoClassStateChanged(activePseudoClass, true);
  }
  openAnimation.play();
}

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

private void showError(ValidatorBase validator) {
  // set text in error label
  errorLabel.setText(validator.getMessage());
  // show error icon
  Node icon = validator.getIcon();
  errorIcon.getChildren().clear();
  if (icon != null) {
    errorIcon.getChildren().setAll(icon);
    StackPane.setAlignment(icon, Pos.CENTER_RIGHT);
  }
  setVisible(true);
}

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

public TabContentHolder(Tab tab) {
  this.tab = tab;
  getStyleClass().setAll("tab-content-area");
  setManaged(false);
  updateContent();
  setVisible(tab.isSelected());
  tab.selectedProperty().addListener(weakTabSelectedListener);
  tab.contentProperty().addListener(weakTabContentListener);
}

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

private void refreshView() {
  if (glyph.getValue() == null) {
    idLabel.setText("");
    nameLabel.setText("");
    return;
  }
  sizeSlider.valueProperty().addListener(observable -> glyph.get().setSize(sizeSlider.getValue()));
  idLabel.setText(String.format("%04d", glyph.get().getGlyphId()));
  nameLabel.setText(glyph.get().getName());
  glyph.get().setFill(colorPicker.getValue());
  glyph.get().fillProperty().bind(colorPicker.valueProperty());
  centeredGlyph.getChildren().setAll(glyph.get());
}

相关文章