本文整理匯總了Java中javafx.scene.layout.ColumnConstraintsBuilder類的典型用法代碼示例。如果您正苦於以下問題:Java ColumnConstraintsBuilder類的具體用法?Java ColumnConstraintsBuilder怎麽用?Java ColumnConstraintsBuilder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ColumnConstraintsBuilder類屬於javafx.scene.layout包,在下文中一共展示了ColumnConstraintsBuilder類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: start
import javafx.scene.layout.ColumnConstraintsBuilder; //導入依賴的package包/類
@Override
public void start(Stage stage) throws Exception {
this.stage = stage;
configureScene();
configureStage();
// Logic starts
VBox vb = new VBox();
vb.setSpacing(10);
final VBox layout = VBoxBuilder.create().build();
layout.getChildren().add(new DynamicTextArea());
Button btn = ButtonBuilder.create().text("Add").onAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent arg0) {
layout.getChildren().add(new DynamicTextArea());
}
}).build();
final GridPane gridPane = GridPaneBuilder.create()
.styleClass("contact-details-gridpane")
// [ARE] Further modification for CAEMR-2098. Setting minimum width to show labels even if application width is changed.
.columnConstraints(ColumnConstraintsBuilder.create().hgrow(Priority.NEVER).minWidth(80).build(),
ColumnConstraintsBuilder.create().hgrow(Priority.ALWAYS).build(),
ColumnConstraintsBuilder.create().hgrow(Priority.NEVER).minWidth(100).build()).build();
gridPane.addRow(0, new Label("hi"), layout, btn);
root.getChildren().add(ScrollPaneBuilder.create().styleClass("contact-details-pane").hbarPolicy(ScrollBarPolicy.NEVER)
.fitToWidth(true).content(gridPane).build());
}