Search in sources :

Example 21 with ScrollPane

use of javafx.scene.control.ScrollPane in project pmd by pmd.

the class MainDesignerController method showLicensePopup.

private void showLicensePopup() {
    Alert licenseAlert = new Alert(AlertType.INFORMATION);
    licenseAlert.setWidth(500);
    licenseAlert.setHeaderText("License");
    ScrollPane scroll = new ScrollPane();
    try {
        scroll.setContent(new TextArea(IOUtils.toString(getClass().getResourceAsStream("LICENSE"))));
    } catch (IOException e) {
        e.printStackTrace();
    }
    licenseAlert.getDialogPane().setContent(scroll);
    licenseAlert.showAndWait();
}
Also used : TextArea(javafx.scene.control.TextArea) ScrollPane(javafx.scene.control.ScrollPane) Alert(javafx.scene.control.Alert) IOException(java.io.IOException)

Example 22 with ScrollPane

use of javafx.scene.control.ScrollPane in project DeskChan by DeskChan.

the class ControlsPanel method wrap.

void wrap() {
    if (wrapper == null) {
        wrapper = new BorderPane();
        wrapper.setId(getFullName());
    } else {
        wrapper.getChildren().clear();
    }
    ScrollPane nodeScrollPanel = new ScrollPane();
    nodeScrollPanel.setHbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED);
    nodeScrollPanel.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED);
    nodeScrollPanel.setFitToHeight(true);
    nodeScrollPanel.setFitToWidth(true);
    // nodeScrollPanel.minWidthProperty().bind(panelPane.widthProperty());
    // nodeScrollPanel.setStyle("-fx-background-color:transparent;");
    nodeScrollPanel.setContent(panelPane);
    wrapper.setCenter(nodeScrollPanel);
}
Also used : ScrollPane(javafx.scene.control.ScrollPane)

Example 23 with ScrollPane

use of javafx.scene.control.ScrollPane in project POL-POM-5 by PlayOnLinux.

the class ContainerEngineToolsPanelSkin method initialise.

/**
 * {@inheritDoc}
 */
@Override
public void initialise() {
    final Text title = new Text(tr("Engine tools"));
    title.getStyleClass().add("title");
    final FlowPane toolButtonContainer = createToolButtonContainer();
    final VBox toolsPane = new VBox(title, toolButtonContainer);
    toolsPane.getStyleClass().addAll("containerConfigurationPane");
    final ScrollPane scrollPane = new ScrollPane(toolsPane);
    scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    scrollPane.setFitToWidth(true);
    getChildren().addAll(scrollPane);
}
Also used : ScrollPane(javafx.scene.control.ScrollPane) FlowPane(javafx.scene.layout.FlowPane) Text(javafx.scene.text.Text) VBox(javafx.scene.layout.VBox)

Example 24 with ScrollPane

use of javafx.scene.control.ScrollPane in project POL-POM-5 by PlayOnLinux.

the class ContainerVerbsPanelSkin method initialise.

/**
 * {@inheritDoc}
 */
@Override
public void initialise() {
    final Text title = new Text(tr("Verbs"));
    title.getStyleClass().add("title");
    final GridPane verbs = new GridPane();
    verbs.getStyleClass().add("verb-grid");
    // ensure that the shown verbs are always up to date
    getControl().getVerbScripts().addListener((Observable invalidation) -> updateVerbs(verbs));
    // ensure that the shown verbs are correctly initialized
    updateVerbs(verbs);
    final ScrollPane verbScrollPanel = new ScrollPane(verbs);
    verbScrollPanel.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    verbScrollPanel.setFitToWidth(true);
    VBox.setVgrow(verbScrollPanel, Priority.ALWAYS);
    final HBox verbManagementButtons = createVerbManagementButtons(verbs);
    verbManagementButtons.getStyleClass().add("verb-management-button-container");
    final VBox container = new VBox(title, verbScrollPanel, verbManagementButtons);
    container.getStyleClass().addAll("container-details-panel", "container-verbs-panel");
    getChildren().setAll(container);
}
Also used : HBox(javafx.scene.layout.HBox) GridPane(javafx.scene.layout.GridPane) ScrollPane(javafx.scene.control.ScrollPane) Text(javafx.scene.text.Text) VBox(javafx.scene.layout.VBox) Observable(javafx.beans.Observable)

Example 25 with ScrollPane

use of javafx.scene.control.ScrollPane in project POL-POM-5 by PlayOnLinux.

the class IconsListWidgetSkin method initialise.

/**
 * {@inheritDoc}
 */
@Override
public void initialise() {
    final ScrollPane scrollPane = new ScrollPane();
    scrollPane.getStyleClass().add("iconListWidget");
    scrollPane.setCache(true);
    scrollPane.setCacheHint(CacheHint.QUALITY);
    scrollPane.setContent(createContent(scrollPane));
    getChildren().addAll(scrollPane);
}
Also used : ScrollPane(javafx.scene.control.ScrollPane)

Aggregations

ScrollPane (javafx.scene.control.ScrollPane)74 VBox (javafx.scene.layout.VBox)18 Text (javafx.scene.text.Text)15 Scene (javafx.scene.Scene)14 Label (javafx.scene.control.Label)13 Insets (javafx.geometry.Insets)11 Button (javafx.scene.control.Button)11 BorderPane (javafx.scene.layout.BorderPane)11 HBox (javafx.scene.layout.HBox)10 GridPane (javafx.scene.layout.GridPane)9 TextFlow (javafx.scene.text.TextFlow)8 FXCollections (javafx.collections.FXCollections)7 Node (javafx.scene.Node)7 TextArea (javafx.scene.control.TextArea)7 javafx.scene.layout (javafx.scene.layout)7 Pane (javafx.scene.layout.Pane)7 InvalidationListener (javafx.beans.InvalidationListener)6 Observable (javafx.beans.Observable)6 ObservableList (javafx.collections.ObservableList)6 Alert (javafx.scene.control.Alert)6