Ejemplo n.º 1
0
 public static Label addMultilineLabel(GridPane gridPane, int rowIndex, String text, double top) {
   Label label = new Label(text);
   label.setWrapText(true);
   GridPane.setHalignment(label, HPos.LEFT);
   GridPane.setRowIndex(label, rowIndex);
   GridPane.setColumnSpan(label, 2);
   GridPane.setMargin(label, new Insets(top, 0, 0, 0));
   gridPane.getChildren().add(label);
   return label;
 }
Ejemplo n.º 2
0
 public static TitledGroupBg addTitledGroupBg(
     GridPane gridPane, int rowIndex, int rowSpan, String title, double top) {
   TitledGroupBg titledGroupBg = new TitledGroupBg();
   titledGroupBg.setText(title);
   titledGroupBg.prefWidthProperty().bind(gridPane.widthProperty());
   GridPane.setRowIndex(titledGroupBg, rowIndex);
   GridPane.setRowSpan(titledGroupBg, rowSpan);
   GridPane.setColumnSpan(titledGroupBg, 2);
   GridPane.setMargin(titledGroupBg, new Insets(top, -10, -10, -10));
   gridPane.getChildren().add(titledGroupBg);
   return titledGroupBg;
 }