default FXMLLoader loadFXML()

in src/main/java/org/apache/cayenne/modeler/layout/LayoutSupport.java [35:51]


    default FXMLLoader loadFXML(final String fxmlPath) throws IOException
    {
        final FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(fxmlPath));

        fxmlLoader.setRoot(this);
        fxmlLoader.setController(this);
        fxmlLoader.load();

        // Note: Must manually initialize the layout because JavaFX will not
        //       automatically call the "initialize" method when the FXML is
        //       loaded from an interface's default method.  To avoid confusion
        //       with the JavaFX "initialize" name, a different method name is
        //       used for the same purpose.
        initializeLayout();

        return fxmlLoader;
    }