本文整理了Java中javafx.scene.layout.VBox.setMargin()
方法的一些代码示例,展示了VBox.setMargin()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VBox.setMargin()
方法的具体详情如下:
包路径:javafx.scene.layout.VBox
类名称:VBox
方法名:setMargin
暂无
代码示例来源:origin: GoMint/GoMint
public Node getScroller() {
VBox.setMargin( this.scrollBar, new Insets( 0, 20, 0, 20 ) );
this.scrollBar.setMax( ( ( this.data.size() / ( TimeUnit.SECONDS.toNanos( 1 ) / this.tickNanos ) ) / 60 ) - 1 );
return this.scrollBar;
}
代码示例来源:origin: org.jfxtras/jfxtras-common
/**
*
* @param node
*/
protected void apply(Node node)
{
// sanatize the node
super.apply(node);
// apply constraints
if (vgrow != null) GenericLayoutConstraints.overrideMaxHeight(node, this);
javafx.scene.layout.VBox.setVgrow(node, vgrow != null ? vgrow : vgrowReset);
javafx.scene.layout.VBox.setMargin(node, margin != null ? margin : marginReset);
}
}
代码示例来源:origin: org.copper-engine/copper-monitoring-client
private Node createLegendEntry(String text, Color color) {
HBox hbox = new HBox();
hbox.setAlignment(Pos.CENTER_LEFT);
hbox.setSpacing(3);
hbox.getChildren().add(new Rectangle(15, 15, color));
hbox.getChildren().add(new Label(text));
VBox.setMargin(hbox, new Insets(1.5, 3, 1.5, 3));
return hbox;
}
代码示例来源:origin: io.datafx/ui
public SimpleForm() {
setSpacing(12);
titlePane = new AnchorPane();
titlePane.getStyleClass().add("datafx-form-title");
titleLabel = new Label();
titleLabel.getStyleClass().add("datafx-form-title-label");
AnchorPane.setLeftAnchor(titleLabel, 12.0);
AnchorPane.setTopAnchor(titleLabel, 6.0);
AnchorPane.setBottomAnchor(titleLabel, 6.0);
titlePane.getChildren().add(titleLabel);
titlePane.setVisible(false);
getChildren().add(titlePane);
mainPane = new GridPane();
mainPane.setAlignment(Pos.CENTER_RIGHT);
mainPane.setHgap(12.0);
mainPane.setVgap(6.0);
VBox.setMargin(mainPane, new Insets(0, 16, 0, 16));
getChildren().add(mainPane);
actionPane = new FlowPane();
actionPane.setAlignment(Pos.CENTER_RIGHT);
actionPane.setHgap(6.0);
VBox.setMargin(actionPane, new Insets(0, 16, 12, 16));
getChildren().add(actionPane);
}
代码示例来源:origin: org.javafxdata/datafx-ui
public SimpleForm() {
setSpacing(12);
titlePane = new AnchorPane();
titlePane.getStyleClass().add("datafx-form-title");
titleLabel = new Label();
titleLabel.getStyleClass().add("datafx-form-title-label");
AnchorPane.setLeftAnchor(titleLabel, 12.0);
AnchorPane.setTopAnchor(titleLabel, 6.0);
AnchorPane.setBottomAnchor(titleLabel, 6.0);
titlePane.getChildren().add(titleLabel);
titlePane.setVisible(false);
getChildren().add(titlePane);
mainPane = new GridPane();
mainPane.setAlignment(Pos.CENTER_RIGHT);
mainPane.setHgap(12.0);
mainPane.setVgap(6.0);
VBox.setMargin(mainPane, new Insets(0, 16, 0, 16));
getChildren().add(mainPane);
actionPane = new FlowPane();
actionPane.setAlignment(Pos.CENTER_RIGHT);
actionPane.setHgap(6.0);
VBox.setMargin(actionPane, new Insets(0, 16, 12, 16));
getChildren().add(actionPane);
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
private void buildActions() {
okButton.getStyleClass().addAll("button-transparent-border-transparent");
okButton.setDefaultButton(true);
okButton.setText(controller.getGLocalised("DONE_LABEL").toUpperCase());
cancelButton.getStyleClass().addAll("button-transparent-border-transparent");
cancelButton.setText(controller.getGLocalised("CANCEL_LABEL").toUpperCase());
actions.getStyleClass().add("form-actions-inline-editor-wrapper");
actions.getChildren().addAll(NodeHelper.horizontalSpacer(), cancelButton, okButton);
allOverContainer.getChildren().add(actions);
VBox.setMargin(actions, new Insets(16, 0, 0, 0));
cancelButton.setOnAction(e -> onCancel());
okButton.setOnAction(e -> onOk());
}
代码示例来源:origin: org.copper-engine/copper-monitoring-client
private HBox createYearMonthChooser() {
final HBox hBox = new HBox(3);
hBox.setAlignment(Pos.CENTER_LEFT);
final ComboBox<Integer> months = new ComboBox<Integer>();
months.setConverter(new IntegerStringConverter());
months.valueProperty().bindBidirectional(model.month);
months.setEditable(true);
for (int i = 0; i < 12; i++) {
months.getItems().add(i + 1);
}
final ComboBox<Integer> years = new ComboBox<Integer>();
for (int i = 1970; i < 2100; i++) {
years.getItems().add(i);
}
years.valueProperty().bindBidirectional(model.year);
years.setEditable(true);
years.setConverter(new IntegerStringConverter());
hBox.getChildren().add(new Label("Date"));
hBox.getChildren().add(months);
hBox.getChildren().add(years);
VBox.setMargin(hBox, new Insets(3));
return hBox;
}
代码示例来源:origin: org.copper-engine/copper-monitoring-client
vbox.getChildren().add(gridPane);
updateDayInMonthChooser(gridPane);
VBox.setMargin(gridPane, new Insets(3));
final HBox timeChooser = createTimeChooser();
vbox.getChildren().add(timeChooser);
代码示例来源:origin: org.copper-engine/copper-monitoring-client
hBox.getChildren().add(new Label(":"));
hBox.getChildren().add(secound);
VBox.setMargin(hBox, new Insets(3));
return hBox;
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
VBox.setMargin(actions, new Insets(16, 0, 0, 0));
代码示例来源:origin: com.aquafx-project/aquafx
info.setStyle("-fx-font-size : 0.8em");
info.setWrapText(true);
VBox.setMargin(info, new Insets(14, 0, 0, 0));
vbox.getChildren().add(info);
代码示例来源:origin: org.jrebirth.af/component
HBox.setMargin(b, new Insets(0, 1, 0, 0));
} else if (this.box instanceof VBox) {
VBox.setMargin(b, new Insets(1, 0, 0, 0));
代码示例来源:origin: io.github.factoryfx/javafxDataEditing
VBox.setMargin(diffValuesPane,new Insets(0,3,0,3));
VBox.setVgrow(diffValuesPane,Priority.ALWAYS);
vBox.getChildren().add(diffValuesPane);
代码示例来源:origin: io.github.factoryfx/javafxDataEditing
HBox listControls = new HBox();
listControls.setAlignment(Pos.CENTER_LEFT);
VBox.setMargin(listControls, new Insets(0, 0, 0, 0));
listControls.setSpacing(3);
代码示例来源:origin: io.github.factoryfx/javafxDataEditing
detailViewWrapper.setBorder(new Border(new BorderStroke(Color.GREY, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(2))));
detailViewWrapper.setPadding(new Insets(3));
VBox.setMargin(detailView,new Insets(3,0,0,0));
内容来源于网络,如有侵权,请联系作者删除!