use of javafx.scene.control.ScrollPane in project jvarkit by lindenb.
the class VcfStage method buildJavascriptPane.
private Tab buildJavascriptPane() {
final ScrollPane scroll = new ScrollPane(super.javascriptArea);
scroll.setFitToWidth(true);
scroll.setFitToHeight(true);
final BorderPane pane = new BorderPane(scroll);
if (this.owner.javascriptCompiler.isPresent()) {
final HBox flowPane = new HBox(new Label("set following FILTER on rejection:"), javascriptFILTERfield);
this.javascriptFILTERfield.setPrefColumnCount(30);
this.javascriptFILTERfield.setPromptText("If not empty , don't discard the variant but set the FILTER");
flowPane.getChildren().addAll(super.makeJavascriptButtons());
pane.setTop(flowPane);
}
final FlowPane bottom = new FlowPane(new TextFlow(new Text("The script injects:\n" + "* '" + HEADER_CONTEXT_KEY + "' an instance of "), javadocFor(VCFHeader.class), new Text("\n" + "* '" + VARIANT_CONTEXT_KEY + "' an instance of "), javadocFor(VariantContext.class), new Text(" )\n" + "* '" + PEDIGREE_CONTEXT_KEY + "' an instance of "), javadocFor(PedFile.class), new Text("\n" + "* '" + TOOL_CONTEXT_KEY + "' an instance of "), javadocFor(VcfTools.class), new Text("\n" + "The script should return a boolean: true (accept variant) or false (reject variant)")));
pane.setBottom(bottom);
final Tab tab = new Tab(JAVASCRIPT_TAB_KEY, pane);
tab.setClosable(false);
return tab;
}
use of javafx.scene.control.ScrollPane in project jvarkit by lindenb.
the class JfxLauncher method displayAlert.
protected void displayAlert(final Throwable err) {
final Alert alert = new Alert(AlertType.ERROR);
alert.setHeaderText("Cannot create Command.");
alert.setContentText(String.valueOf(err.getMessage()));
// Create expandable Exception.
final StringWriter sw = new StringWriter();
final PrintWriter pw = new PrintWriter(sw);
err.printStackTrace(pw);
final TextArea textArea = new TextArea(sw.toString());
textArea.setEditable(false);
textArea.setWrapText(true);
final BorderPane pane = new BorderPane(new ScrollPane(textArea));
alert.getDialogPane().setExpandableContent(pane);
alert.showAndWait();
}
use of javafx.scene.control.ScrollPane in project POL-POM-5 by PhoenicisOrg.
the class StepRepresentationMessage method drawStepContent.
@Override
protected void drawStepContent() {
Text textWidget = new Text(textToShow);
textWidget.setId("stepText");
ScrollPane scrollPane = new ScrollPane();
scrollPane.setId("stepScrollPane");
scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
scrollPane.setFitToWidth(true);
scrollPane.setContent(new TextFlow(textWidget));
this.addToContentPane(scrollPane);
VBox.setVgrow(scrollPane, Priority.ALWAYS);
}
use of javafx.scene.control.ScrollPane in project POL-POM-5 by PhoenicisOrg.
the class ApplicationInformationPanelSkin method initialise.
/**
* {@inheritDoc}
*/
@Override
public void initialise() {
final WebView appDescription = new WebView();
appDescription.getEngine().userStyleSheetLocationProperty().bind(getControl().webEngineStylesheetProperty());
VBox.setVgrow(appDescription, Priority.ALWAYS);
getControl().applicationProperty().addListener((Observable invalidation) -> updateDescription(appDescription));
updateDescription(appDescription);
final Label installers = new Label(tr("Installers"));
installers.getStyleClass().add("descriptionTitle");
final GridPane scriptGrid = new GridPane();
filteredScripts.addListener((InvalidationListener) change -> updateScripts(scriptGrid));
getControl().showScriptSourceProperty().addListener((Observable invalidation) -> updateScripts(scriptGrid));
updateScripts(scriptGrid);
final HBox miniaturesPane = new HBox();
miniaturesPane.getStyleClass().add("appPanelMiniaturesPane");
Bindings.bindContent(miniaturesPane.getChildren(), miniatures);
final ScrollPane miniaturesPaneWrapper = new ScrollPane(miniaturesPane);
miniaturesPaneWrapper.getStyleClass().add("appPanelMiniaturesPaneWrapper");
miniatureHeight.bind(miniaturesPaneWrapper.heightProperty().multiply(0.8));
final VBox container = new VBox(appDescription, installers, scriptGrid, miniaturesPaneWrapper);
getChildren().add(container);
// ensure that the content of the details panel changes when the to be shown application changes
getControl().applicationProperty().addListener((Observable invalidation) -> updateApplication());
// initialise the content of the details panel correct
updateApplication();
}
use of javafx.scene.control.ScrollPane in project POL-POM-5 by PhoenicisOrg.
the class ContainerEngineSettingsPanelSkin method initialise.
/**
* {@inheritDoc}
*/
@Override
public void initialise() {
final Text title = new Text(tr("Engine Settings"));
title.getStyleClass().add("title");
final GridPane engineSettingsGrid = new GridPane();
engineSettingsGrid.getStyleClass().add("engine-settings-grid");
// ensure that the shown engine settings are always up to date
getControl().containerProperty().addListener((Observable invalidation) -> updateEngineSettingsGrid(engineSettingsGrid));
getControl().getEngineSettings().addListener((Observable invalidation) -> updateEngineSettingsGrid(engineSettingsGrid));
// ensure that the shown engine settings are correctly initialized
updateEngineSettingsGrid(engineSettingsGrid);
final ScrollPane engineSettingsScrollPane = new ScrollPane(engineSettingsGrid);
engineSettingsScrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
engineSettingsScrollPane.setFitToWidth(true);
VBox.setVgrow(engineSettingsScrollPane, Priority.ALWAYS);
final VBox container = new VBox(title, engineSettingsScrollPane);
container.getStyleClass().addAll("container-details-panel", "container-engine-settings-panel");
getChildren().setAll(container);
}
Aggregations