Package javafx.fxml

Examples of javafx.fxml.FXMLLoader.load()


            try {
                fxmlLoader.load();
            } catch (IOException exception) {
                try {
                    fxmlLoader.setClassLoader(FXMLLoader.getDefaultClassLoader());
                    fxmlLoader.load();
                } catch (IOException ex) {
                    Exceptions.printStackTrace(ex);
                }
            }
        } catch (MalformedURLException ex) {
View Full Code Here


  @Override
  public void start(Stage stage) throws Exception {
    FXMLLoader fxmlLoader = new FXMLLoader();
    fxmlLoader.setLocation(getClass().getResource(fxmlFile));
    fxmlLoader.load(getClass().getResourceAsStream(fxmlFile));
    Parent root = fxmlLoader.<Parent>getRoot();
   
    for (Node node : root.lookupAll("Button")) {
      node.addEventHandler(ActionEvent.ACTION, this);
    }
View Full Code Here

    public void initRootLayout() {
        try {
            // Load root layout from fxml file.
            FXMLLoader loader = new FXMLLoader();
            loader.setLocation(MainQuizCreator.class.getResource("view/RootLayout.fxml"));
            rootLayout = (BorderPane) loader.load();
            RootLayoutController rootController = loader.getController();
            rootController.setMainQuizCreator(this);
            // Show the scene containing the root layout.
            Scene scene = new Scene(rootLayout, WIDTH, HEIGHT);
            primaryStage.setScene(scene);
View Full Code Here

    public void showD2LQuizCreatorMain() {
        try {
            // Load person overview.
            FXMLLoader loader = new FXMLLoader();
            loader.setLocation(MainQuizCreator.class.getResource("view/D2LQuizCreatorMain.fxml"));
            AnchorPane D2LQuizCreatorMain = (AnchorPane) loader.load();
            D2LQuizCreatorMainController controller;
            controller = loader.getController();
            controller.setMainQuizCreator(this);
            // Set person overview into the center of root layout.
            rootLayout.setCenter(D2LQuizCreatorMain);
View Full Code Here

    public void showQuizOptions(Quiz quiz){
            try {
                // Load quiz options view.
                FXMLLoader loader = new FXMLLoader();
                loader.setLocation(MainQuizCreator.class.getResource("view/QuizOptionsScene.fxml"));
                AnchorPane QuizOptionsScene = (AnchorPane) loader.load();
                QuizOptionsController controller;
                controller = loader.getController();
                controller.setMainQuizCreator(this);
                if(quiz != null) {
                    //showing quiz private BorderPane rootLayout;
View Full Code Here

    }
   
    public void showAboutUsDialog(){
        try{
            FXMLLoader loader = new FXMLLoader(MainQuizCreator.class.getResource("view/AboutUsDialog.fxml"));
            AnchorPane page = (AnchorPane) loader.load();
            Stage dialogStage = new Stage();
            dialogStage.setTitle("About Us");
            dialogStage.initModality(Modality.WINDOW_MODAL);
            dialogStage.initOwner(primaryStage);
            Scene scene = new Scene(page);
View Full Code Here

    public void showQuizQuestionRoot(){
        try {
            // Load quiz options view.
            FXMLLoader loader = new FXMLLoader();
            loader.setLocation(MainQuizCreator.class.getResource("view/QuestionRootLayout.fxml"));
            questionRootLayout = (BorderPane) loader.load();
            QuestionRootLayoutController controller;
            controller = loader.getController();
            controller.setMainQuizCreator(this);
            primaryStage.setMaximized(true);
           
View Full Code Here

    public void loadQuestionTabPane(){
        try {
            // Load person overview.
            FXMLLoader loader = new FXMLLoader();
            loader.setLocation(MainQuizCreator.class.getResource("view/CreateQuestionsTabPage.fxml"));
            AnchorPane QuestionTabPane = (AnchorPane) loader.load();
            //D2LQuizCreatorMainController controller;
            //controller = loader.getController();
            //controller.setMainQuizCreator(this);
           
           
View Full Code Here

            FXMLLoader loader = new FXMLLoader(getResource("controls/project_view.fxml"));
            loader.setRoot(this);
            loader.setController(this);
            // The following line is supposed to help Scene Builder, although it doesn't seem to be needed for me.
            loader.setClassLoader(getClass().getClassLoader());
            loader.load();

            goalAmountFormatStr = goalAmountLabel.getText();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
View Full Code Here

            FXMLLoader loader = new FXMLLoader(getClass().getResource("bitcoin_address.fxml"));
            loader.setRoot(this);
            loader.setController(this);
            // The following line is supposed to help Scene Builder, although it doesn't seem to be needed for me.
            loader.setClassLoader(getClass().getClassLoader());
            loader.load();

            copyWidget.setCursor(Cursor.HAND);
            AwesomeDude.setIcon(copyWidget, AwesomeIcon.COPY);
            Tooltip.install(copyWidget, new Tooltip("Copy address to clipboard"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.