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; }
/** * * @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); } }
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; }
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); }
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); }
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()); }
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; }
vbox.getChildren().add(gridPane); updateDayInMonthChooser(gridPane); VBox.setMargin(gridPane, new Insets(3)); final HBox timeChooser = createTimeChooser(); vbox.getChildren().add(timeChooser);
hBox.getChildren().add(new Label(":")); hBox.getChildren().add(secound); VBox.setMargin(hBox, new Insets(3)); return hBox;
VBox.setMargin(actions, new Insets(16, 0, 0, 0));
info.setStyle("-fx-font-size : 0.8em"); info.setWrapText(true); VBox.setMargin(info, new Insets(14, 0, 0, 0)); vbox.getChildren().add(info);
HBox.setMargin(b, new Insets(0, 1, 0, 0)); } else if (this.box instanceof VBox) { VBox.setMargin(b, new Insets(1, 0, 0, 0));
VBox.setMargin(diffValuesPane,new Insets(0,3,0,3)); VBox.setVgrow(diffValuesPane,Priority.ALWAYS); vBox.getChildren().add(diffValuesPane);
HBox listControls = new HBox(); listControls.setAlignment(Pos.CENTER_LEFT); VBox.setMargin(listControls, new Insets(0, 0, 0, 0)); listControls.setSpacing(3);
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));