Package javafx.scene

Examples of javafx.scene.Parent


    static final String STYLE_SHEET = DARK_STYLE_SHEET;

    @Override
    public void start(Stage primaryStage) throws Exception{
        Parent root = FXMLLoader.load(getClass().getResource(RESOURCE));
        primaryStage.setTitle("JMetro");
        root.getStylesheets().add(getClass().getResource(STYLE_SHEET).toExternalForm());
        Scene scene = new Scene(root);
        primaryStage.setScene(scene);
        primaryStage.show();

        ScenicView.show(scene);
View Full Code Here


            throw new IllegalStateException("Cannot load " + conventionalName, ex);
        }
    }

    public Parent getView() {
        Parent parent = this.loader.getRoot();
        addCSSIfAvailable(parent);
        return parent;
    }
View Full Code Here

        }
        return loader;
    }

    public Parent getView() {
        Parent parent = getLoader().getRoot();
        addCSSIfAvailable(parent);
        return parent;
    }
View Full Code Here

     *
     * @return
     */
    public Parent getView() {
        this.initializeFXMLLoader();
        Parent parent = fxmlLoader.getRoot();
        addCSSIfAvailable(parent);
        return parent;
    }
View Full Code Here

*/
public class RandomEvents extends Application {
   
    @Override
    public void start(Stage stage) throws Exception {
        Parent root = FXMLLoader.load(getClass().getResource("RandomEventsMain.fxml"));
       
        Scene scene = new Scene(root);
       
        stage.setScene(scene);
        stage.show();
View Full Code Here

        final URL location = getClass().getResource(FXML_MAIN);
        final FXMLLoader loader = new FXMLLoader();
        loader.setLocation(location);
        loader.setBuilderFactory(new JavaFXBuilderFactory());
        loader.setResources(ResourceBundle.getBundle("ApplicationResources"));
        final Parent root = (Parent) loader.load(location.openStream());

        // set controller into provider
        ControllerProvider.getInstance().setMainController((MainController) loader.getController());

        // create scene and display window
View Full Code Here

     * @param event the action event
     */
    @FXML
    protected void showCreateLeagueWindow(final ActionEvent event) {
        // build dialogue with builder
        final Parent root = new CreateLeagueSceneBuilder().buildScene();
        final Scene scene = new Scene(root);
        scene.getStylesheets().add("stylesheet.css");
        final Stage stage = new Stage();
        stage.setScene(scene);
        stage.setResizable(false);
View Full Code Here

     *
     * @param event the action event
     */
    public void showCreateLeagueWindow(final ActionEvent event) {
        // build dialogue with builder
        final Parent root = new CreateLeagueSceneBuilder().buildScene();

        // build dialogue with FXML
        //        Parent root = null;
        //        try {
        //            root = FXMLLoader.load(getClass().getResource(SCENE_CREATE_LEAGUE), ResourceBundle.getBundle("ApplicationResources"));
View Full Code Here

        }
        return loader;
    }

    public Parent getView() {
        Parent parent = getLoader().getRoot();
        addCSSIfAvailable(parent);
        return parent;
    }
View Full Code Here

    @Override
    public void start(Stage stage) throws Exception {
        (new LogUtils()).setupLogger();
        Utils.printVersion();
       
        Parent root = FXMLLoader.load(getClass().getResource("ui/MainUI.fxml"));
       
        Scene scene = new Scene(new BorderPane(), 1, 1);
        scene.setFill(null);
       
        stage.initStyle(StageStyle.TRANSPARENT);
View Full Code Here

TOP

Related Classes of javafx.scene.Parent

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.