Package javafx.scene.layout

Examples of javafx.scene.layout.TilePane


        System.out.println("Setting up Mode Picker stage");
        stage = new Stage();
        stage.setTitle(MiniDisc.getAppTitle()+" - Choose Mode");
        stage.setResizable(false);

        TilePane mainGroup = new TilePane();
        mainGroup.setPrefColumns(3);
        Scene scene = new Scene(mainGroup);
        stage.setScene(scene);

        Button cueWindowLaunchButton = new Button("Cue Player");
        cueWindowLaunchButton.setGraphic(new ImageView(new Image(ModePicker.class.getResourceAsStream("/net/angusi/sw/minidisc/res/icons/gostopfadeicon.png"))));
        cueWindowLaunchButton.setContentDisplay(ContentDisplay.TOP);
        cueWindowLaunchButton.setOnAction(event -> {
            CueWindow.getStage().show();
            stage.hide();
        });
        mainGroup.getChildren().add(cueWindowLaunchButton);

        Button cartWindowLaunchButton = new Button("Cart Player");
        cartWindowLaunchButton.setGraphic(new ImageView(new Image(ModePicker.class.getResourceAsStream("/net/angusi/sw/minidisc/res/icons/cartplayericon.png"))));
        cartWindowLaunchButton.setContentDisplay(ContentDisplay.TOP);
        cartWindowLaunchButton.setOnAction(event -> stage.hide());
        cartWindowLaunchButton.setDisable(true);
        mainGroup.getChildren().add(cartWindowLaunchButton);

        Button quitButton = new Button("Exit");
        quitButton.setGraphic(new ImageView(new Image(ModePicker.class.getResourceAsStream("/net/angusi/sw/minidisc/res/icons/quiticon.png"))));
        quitButton.setContentDisplay(ContentDisplay.TOP);
        quitButton.setOnAction(event -> MiniDisc.quitApplication());
        mainGroup.getChildren().add(quitButton);

        stage.sizeToScene();
        stage.centerOnScreen();
    }
View Full Code Here

TOP

Related Classes of javafx.scene.layout.TilePane

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.