acroForms.setId("acroFormsCombo"); options.add(new Label(i18n.i18n("Interactive forms (AcroForms):")), 0, 0); acroForms.setMaxWidth(Double.POSITIVE_INFINITY); options.add(acroForms, 1, 0); options.add(helpIcon(i18n.i18n("What to do in case one or more input documents contain Acro Forms")), 2, 0); outline.setMaxWidth(Double.POSITIVE_INFINITY); options.add(outline, 1, 1); options.add(helpIcon(i18n.i18n("What to do in case one or more input documents contain bookmarks")), 2, 1); toc.setMaxWidth(Double.POSITIVE_INFINITY); options.add(toc, 1, 2); options.add(helpIcon(i18n.i18n("Set if a table of contents should be added to the generated PDF document")), 2,
/** * {@inheritDoc} */ @Override public void layoutParts() { super.layoutParts(); int columns = field.getSpan(); readOnlyLabel.getStyleClass().add("read-only-label"); comboBox.setMaxWidth(Double.MAX_VALUE); comboBox.setVisibleRowCount(4); stack.setAlignment(Pos.CENTER_LEFT); stack.getChildren().addAll(comboBox, readOnlyLabel); Node labelDescription = field.getLabelDescription(); Node valueDescription = field.getValueDescription(); add(fieldLabel, 0, 0, 2, 1); if (labelDescription != null) { GridPane.setValignment(labelDescription, VPos.TOP); add(labelDescription, 0, 1, 2, 1); } add(stack, 2, 0, columns - 2, 1); if (valueDescription != null) { GridPane.setValignment(valueDescription, VPos.TOP); add(valueDescription, 2, 1, columns - 2, 1); } }
private void populate(List<EngineSetting> engineSettings) { final VBox displayPane = new VBox(); displayPane.getStyleClass().add(CONFIGURATION_PANE_CSS_CLASS); final GridPane displayContentPane = new GridPane(); displayContentPane.getStyleClass().add("grid"); int row = 0; for (EngineSetting setting : engineSettings) { final ComboBox<String> comboBox = new ComboBox<>(); comboBox.setMaxWidth(Double.MAX_VALUE); ObservableList<String> items = FXCollections.observableArrayList(setting.getOptions()); comboBox.setItems(items); comboBox.setValue(setting.getCurrentOption(this.container.getName())); comboBox.valueProperty().addListener((observable, oldValue, newValue) -> Platform.runLater(() -> { this.lockAll(); setting.setOption(this.container.getName(), items.indexOf(newValue)); this.unlockAll(); })); displayContentPane.add(new TextWithStyle(setting.getText(), CAPTION_TITLE_CSS_CLASS), 0, row); displayContentPane.add(comboBox, 1, row); lockableElements.add(comboBox); ++row; } Region spacer = new Region(); GridPane.setHgrow(spacer, Priority.ALWAYS); displayContentPane.add(spacer, 2, 0); displayPane.getChildren().addAll(displayContentPane); this.setContent(displayPane); }