child.setPrefWidth(width); double height = Math.random() * 100 + 100; child.setPrefHeight(height); JFXDepthManager.setDepth(child, 1); children.add(child);
header.setPrefHeight(64 * 3); header.maxHeightProperty().bind(header.prefHeightProperty()); header.getChildren().setAll(bgContainer, barsContainer);
itemNode.setPrefHeight(0.5); itemNode.setPrefWidth(0.5); item.setNode(itemNode);
itemNode.setPrefHeight(0.5); itemNode.setPrefWidth(0.5); item.setNode(itemNode);
stackPane.setPrefHeight(50);
layout.setPrefHeight(heart.getImage().getHeight() * 2);
/** * @{inheritedDoc} */ @Override protected void process() { super.process(); row.endEdition(); for(IInputComponentWrapper r: row.getEntries()) { layout.getChildren().add(r.getDisplay()); } layout.getStyleClass().addAll("white-background", "shadowed-pane", "padding-16-32-16-32"); // shadow will not be visible without padding of this pane StackPane et = new StackPane(); et.setPrefHeight(-1); et.setStyle("-fx-padding:4;-fx-background-color:transparent;"); et.getChildren().add(layout); buildHeaderActions(); processedView(et); }
"resizable-background" ); labelOnResizableBackground.setPrefHeight(60);
sampleNode2.getChildren().add( new Label( "I'm a StackPane")); sampleNode2.setStyle( "-fx-background-color: lightblue"); sampleNode2.setPrefHeight(100); sampleNode2.setPrefWidth(200); sampleNode2.relocate(600,300);
/** * Constructor */ public AdminStaticIconPresenter() { graphic.minHeightProperty().bind(graphic.prefHeightProperty()); graphic.minWidthProperty().bind(graphic.prefWidthProperty()); graphic.maxHeightProperty().bind(graphic.prefHeightProperty()); graphic.maxWidthProperty().bind(graphic.prefWidthProperty()); graphic.setPrefWidth(42); graphic.setPrefHeight(42); Label icon = new Label(); IconUtils.setFontIcon("fa-gears:30", icon); icon.getGraphic().getStyleClass().add("grey-clear-ikonli"); graphic.setAlignment(Pos.CENTER); graphic.getChildren().add(icon); graphic.setStyle("-fx-background-color:-grey-color-50;-fx-border-radius:10;" + "-fx-background-radius:10;"); }
stackPane.setPrefHeight(200); stackPane.setPrefWidth(200); stackPane.setStyle("-fx-background-color: BEIGE");
/** * {@inheritDoc} */ @Override public void setupValueChangedListeners() { super.setupValueChangedListeners(); field.multilineProperty().addListener((observable, oldValue, newValue) -> { stack.setPrefHeight(newValue ? 80 : 0); readOnlyLabel.setPrefHeight(newValue ? 80 : 26); }); field.errorMessagesProperty().addListener((observable, oldValue, newValue) -> toggleTooltip(field.isMultiline() ? editableArea : editableField)); editableField.focusedProperty().addListener((observable, oldValue, newValue) -> toggleTooltip(editableField)); editableArea.focusedProperty().addListener((observable, oldValue, newValue) -> toggleTooltip(editableArea)); }
stack.setPrefHeight(80); readOnlyLabel.setPrefHeight(80);
ret.setPrefHeight( h ); if ( region.getParent() != null ) replaceComponent( region, ret );
header.setPrefHeight(64 * 3); header.maxHeightProperty().bind(header.prefHeightProperty()); header.getChildren().setAll(bgContainer, barsContainer);
sampleStack.setAlignment(Pos.CENTER_LEFT); sampleStack.setMinHeight(height); sampleStack.setPrefHeight(height); sampleStack.setMaxHeight(height); sampleStack.prefWidthProperty().bind(sampleWidth);