Search in sources :

Example 26 with ScrollPane

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

the class SidebarSkinBase method createScrollPane.

/**
 * Creates a {@link ScrollPane} containing the given {@link Node[] nodes}.
 * The nodes are shown below each other in the {@link ScrollPane}
 *
 * @param nodes The nodes inside the returned {@link ScrollPane}
 * @return A {@link ScrollPane} containing all given nodes
 */
protected static ScrollPane createScrollPane(Node... nodes) {
    final VBox content = new VBox(nodes);
    final ScrollPane scrollPane = new ScrollPane(content);
    scrollPane.getStyleClass().add("sidebarScrollbar");
    return scrollPane;
}
Also used : ScrollPane(javafx.scene.control.ScrollPane) VBox(javafx.scene.layout.VBox)

Example 27 with ScrollPane

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

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);
}
Also used : ScrollPane(javafx.scene.control.ScrollPane) Text(javafx.scene.text.Text) TextFlow(javafx.scene.text.TextFlow)

Example 28 with ScrollPane

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

the class StepRepresentationPresentation method drawStepContent.

@Override
protected void drawStepContent() {
    final String title = this.getParentWizardTitle();
    VBox contentPane = new VBox();
    contentPane.setId("presentationBackground");
    Label titleWidget = new Label(title + "\n\n");
    titleWidget.setId("presentationTextTitle");
    Text textWidget = new Text(textToShow);
    textWidget.setId("presentationText");
    TextFlow flow = new TextFlow();
    flow.getChildren().add(textWidget);
    ScrollPane scrollPane = new ScrollPane();
    scrollPane.setId("presentationScrollPane");
    scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    scrollPane.setFitToWidth(true);
    scrollPane.setContent(flow);
    VBox.setVgrow(scrollPane, Priority.ALWAYS);
    contentPane.getChildren().add(scrollPane);
    getParent().getRoot().setCenter(contentPane);
}
Also used : ScrollPane(javafx.scene.control.ScrollPane) Label(javafx.scene.control.Label) Text(javafx.scene.text.Text) TextFlow(javafx.scene.text.TextFlow) VBox(javafx.scene.layout.VBox)

Example 29 with ScrollPane

use of javafx.scene.control.ScrollPane in project Smartcity-Smarthouse by TechnionYP5777.

the class WidgetsRegionBuilderImpl method initWidgetPane.

private void initWidgetPane() {
    widgetsHbox = new HBox();
    widgetsHbox.setSpacing(5);
    widgetsHbox.setPadding(new Insets(5));
    ScrollPane scrollPane = new ScrollPane();
    scrollPane.setStyle("-fx-background-color:transparent;");
    scrollPane.setContent(widgetsHbox);
    scrollPane.setFitToWidth(true);
    scrollPane.setMinHeight(1.2 * tileSize);
    scrollPane.setVbarPolicy(ScrollBarPolicy.NEVER);
    addAppBuilderItem(new AppBuilderItem(null, scrollPane));
}
Also used : HBox(javafx.scene.layout.HBox) Insets(javafx.geometry.Insets) ScrollPane(javafx.scene.control.ScrollPane)

Example 30 with ScrollPane

use of javafx.scene.control.ScrollPane in project parallax-list-view by dukke.

the class ParallaxPaneWithImageTest method start.

@Override
public void start(Stage primaryStage) throws IOException {
    FXMLLoader fxmlLoader = new FXMLLoader(ParallaxPaneWithImageTest.class.getResource("ParallaxPaneWithImageTest.fxml"));
    BorderPane rootPane = fxmlLoader.load();
    ScrollPane scrollPane = new ScrollPane(rootPane);
    scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    Scene scene = new Scene(scrollPane);
    scene.getStylesheets().add(ParallaxPaneWithImageTest.class.getResource("ParallaxPaneTest.css").toExternalForm());
    // ScenicView.show(scene);
    primaryStage.getIcons().add(new Image(ParallaxPaneWithImageTest.class.getResource("Pixel Duke icon_16.png").toExternalForm()));
    primaryStage.setTitle("ParallaxPane Demo");
    primaryStage.setScene(scene);
    primaryStage.show();
    primaryStage.setMaximized(true);
}
Also used : BorderPane(javafx.scene.layout.BorderPane) ScrollPane(javafx.scene.control.ScrollPane) Scene(javafx.scene.Scene) Image(javafx.scene.image.Image) FXMLLoader(javafx.fxml.FXMLLoader)

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