本文整理汇总了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());
}