Package javafx.scene.layout

Examples of javafx.scene.layout.StackPane


            }
        };
    }

    @Override public void start(Stage stage) {                 
        StackPane pane = new StackPane();
        pane.getChildren().addAll(control);       

        Scene scene = new Scene(pane);
        scene.setCamera(new PerspectiveCamera(false));

        stage.setScene(scene);
View Full Code Here


        chart.setTitle("User");       
        //chart.setDataFormat(SimplePieChart.DataFormat.PERCENTAGE);
    }

    @Override public void start(Stage stage) throws Exception {
        StackPane pane = new StackPane();
        pane.setPadding(new Insets(5, 5, 5, 5));
        pane.getChildren().addAll(chart);

        Scene scene = new Scene(pane);
        //scene.setFullScreen(true);

        stage.setTitle("Demo SimplePieChart");
View Full Code Here

                                  .build();
        notifier.setOnNotificationPressed(event -> System.out.println("Notification pressed: " + event.NOTIFICATION.TITLE));
        notifier.setOnShowNotification(event -> System.out.println("Notification shown: " + event.NOTIFICATION.TITLE));
        notifier.setOnHideNotification(event -> System.out.println("Notification hidden: " + event.NOTIFICATION.TITLE));

        StackPane pane = new StackPane();
        pane.setPadding(new Insets(10, 10, 10, 10));
        pane.getChildren().addAll(button);

        Scene scene = new Scene(pane);
        stage.setOnCloseRequest(observable -> notifier.stop());
        stage.setScene(scene);
        stage.show();
View Full Code Here

                               new Stop(1.00000, Color.web("#ef6050")));
        chart.setPolygonMode(true);
    }

    @Override public void start(Stage stage) {
        StackPane pane = new StackPane();
        pane.setPadding(new Insets(5, 5, 5, 5));
        pane.getChildren().addAll(chart);

        Scene scene = new Scene(pane);       

        stage.setTitle("Demo SimpleRadarChart");
        stage.setScene(scene);
View Full Code Here

            }
        };
    }

    @Override public void start(Stage stage) {
        StackPane pane = new StackPane();
        pane.setBackground(new Background(new BackgroundFill(Color.DARKGRAY, CornerRadii.EMPTY, Insets.EMPTY)));
        pane.setPadding(new Insets(10, 10, 10, 10));
        pane.getChildren().add(control);

        Scene scene = new Scene(pane);

        stage.setTitle("VuMeter Demo");
        stage.setScene(scene);
View Full Code Here

            }
        };
    }

    @Override public void start(Stage stage) {
        StackPane pane = new StackPane(control);       
        pane.setPadding(new Insets(10, 10, 10, 10));

        Scene scene = new Scene(pane, 400, 400, Color.rgb(0, 0, 0, 0.8));

        stage.setTitle("Led Bargraph demo");
        stage.setScene(scene);
View Full Code Here

        chart.setUnit("°C");
        chart.setSeries(series);
    }

    @Override public void start(Stage stage) throws Exception {
        StackPane pane = new StackPane();
        pane.setPadding(new Insets(5, 5, 5, 5));
        pane.getChildren().addAll(chart);

        Scene scene = new Scene(pane);
        //scene.setFullScreen(true);

        stage.setTitle("DemoSimpleLineChart SimpleLineChart");
View Full Code Here

     * @return The node.
     */
    private BorderPane createNode(ChartViewer control) {
        BorderPane borderPane = new BorderPane();
        borderPane.setPrefSize(800, 500);
        StackPane sp = new StackPane();
        sp.setMinSize(10, 10);
        sp.setPrefSize(600, 400);
        this.canvas = new ChartCanvas(getSkinnable().getChart());
        this.canvas.setTooltipEnabled(control.isTooltipEnabled());
        this.canvas.addChartMouseListener(control);
        this.canvas.widthProperty().bind(sp.widthProperty());
        this.canvas.heightProperty().bind(sp.heightProperty());
        this.canvas.addMouseHandler(new ZoomHandlerFX("zoom", control));
        sp.getChildren().add(this.canvas);
       
        borderPane.setCenter(sp);
        return borderPane;
    }
View Full Code Here

    @Override
    public void start(Stage primaryStage) {
        gameManager = new GameManager();
        gameBounds = gameManager.getLayoutBounds();

        StackPane root = new StackPane(gameManager);
        root.getStyleClass().addAll("game-root");
        ChangeListener<Number> resize = (ov, v, v1) -> {
            double scale = Math.min((root.getWidth() - MARGIN) / gameBounds.getWidth(), (root.getHeight() - MARGIN) / gameBounds.getHeight());
            gameManager.setScale(scale);
            gameManager.setLayoutX((root.getWidth() - gameBounds.getWidth()) / 2d);
            gameManager.setLayoutY((root.getHeight() - gameBounds.getHeight()) / 2d);
        };
        root.widthProperty().addListener(resize);
        root.heightProperty().addListener(resize);

        Scene scene = new Scene(root);
        scene.getStylesheets().add("game2048/game.css");
        addKeyHandler(scene);
        addSwipeHandlers(scene);
View Full Code Here

        codeArea.textProperty().addListener((obs, oldText, newText) -> {
            codeArea.setStyleSpans(0, computeHighlighting(newText));
        });
        codeArea.replaceText(0, 0, sampleCode);

        Scene scene = new Scene(new StackPane(codeArea), 600, 400);
        scene.getStylesheets().add(stylesheet);
        primaryStage.setScene(scene);
        primaryStage.setTitle("Java Keywords Demo");
        primaryStage.show();
    }
View Full Code Here

TOP

Related Classes of javafx.scene.layout.StackPane

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.