/** * will change the decorator content * * @param content */ public void setContent(Node content) { this.contentPlaceHolder.getChildren().setAll(content); }
@Override public void restore(Pane node) { ArrayList<Node> children = cache.remove(node); if (children != null) { node.getChildren().setAll(children); } } };
/** * set header node * * @param titleContent */ public void setHeading(Node... titleContent) { this.heading.getChildren().setAll(titleContent); }
/** * set actions of the dialog (Accept, Cancel,...) * * @param actions */ public void setActions(Node... actions) { this.actions.getChildren().setAll(actions); }
/*************************************************************************** * * * Setters / Getters * * * **************************************************************************/ public void setLeftItems(Node... nodes) { this.leftBox.getChildren().setAll(nodes); }
/** * set body node * * @param body */ public void setBody(Node... body) { this.body.getChildren().setAll(body); }
public void setSidePane(Node... sidePane) { this.sidePane.getChildren().setAll(sidePane); }
/** * 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); } }
private void initialize() { this.getStyleClass().setAll(DEFAULT_STYLE_CLASS); this.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE); }
public void setContent(Node... content) { this.content.getChildren().setAll(content); if (contentHolder.getChildren().isEmpty()) { updateContent(); } }
private void updateContent() { Node newContent = tab.getContent(); if (newContent == null) { getChildren().clear(); } else { getChildren().setAll(newContent); } }
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); }
/** * 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); }
public JFXAutoCompletePopup() { super(); bridge = new CSSBridge(); getContent().setAll(bridge); setAutoFix(true); setAutoHide(true); setHideOnEscape(true); getStyleClass().add(DEFAULT_STYLE_CLASS); }
private void closeDialog() { resetProperties(); Event.fireEvent(JFXDialog.this, new JFXDialogEvent(JFXDialogEvent.CLOSED)); if (tempContent == null) { dialogContainer.getChildren().remove(this); } else { dialogContainer.getChildren().setAll(tempContent); } }
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); }
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(); }
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); }
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); }
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()); }