// Path: easyfxml/src/main/java/moe/tristan/easyfxml/FxUiManager.java
// public abstract class FxUiManager {
// 
//     private static final Logger LOGGER = LoggerFactory.getLogger(FxUiManager.class);
// 
//     private EasyFxml easyFxml;
// 
//     /**
//      * Called by {@link FxApplication} after Spring and JavaFX are started. This is the equivalent of {@link javafx.application.Application#start(Stage)} in
//      * traditional JavaFX apps.
//      *
//      * @param mainStage A reference to the main stage of the application, received from JavaFX via {@link javafx.application.Application#start(Stage)}.
//      */
//     public void startGui(final Stage mainStage) {
//         try {
//             onStageCreated(mainStage);
//             final Scene mainScene = getScene(mainComponent());
//             onSceneCreated(mainScene);
//             mainStage.setScene(mainScene);
//             mainStage.setTitle(title());
// 
//             Option.ofOptional(getStylesheet())
//                   .filter(style -> !FxmlStylesheets.DEFAULT_JAVAFX_STYLE.equals(style))
//                   .peek(stylesheet -> this.setTheme(stylesheet, mainStage));
// 
//             mainStage.show();
//         } catch (Throwable t) {
//             throw new RuntimeException("There was a failure during start-up of the application.", t);
//         }
//     }
// 
//     /**
//      * @return The title to give the main stage
//      */
//     protected abstract String title();
// 
//     /**
//      * @return The component to load in the main stage upon startup
//      */
//     protected abstract FxmlComponent mainComponent();
// 
//     /**
//      * Called right after the main {@link Scene} was created if you want to edit it.
//      *
//      * @param mainScene The main scene of the application
//      */
//     @SuppressWarnings("unused")
//     protected void onSceneCreated(final Scene mainScene) {
//         //do nothing by default
//     }
// 
//     /**
//      * Called as we enter the {@link #startGui(Stage)} method.
//      *
//      * @param mainStage The main stage, supplied by JavaFX's {@link javafx.application.Application#start(Stage)} method.
//      */
//     @SuppressWarnings("unused")
//     protected void onStageCreated(final Stage mainStage) {
//         //do nothing by default
//     }
// 
//     /**
//      * @return If overriden, this function returns the {@link FxmlStylesheet} to apply to the main window.
//      */
//     protected Optional<FxmlStylesheet> getStylesheet() {
//         return Optional.empty();
//     }
// 
//     /**
//      * Simple utility class to load an {@link FxmlComponent} as a {@link Scene} for use with {@link #mainComponent()}
//      *
//      * @param component the component to load in the {@link Scene}
//      *
//      * @return The ready-to-use {@link Scene}
//      *
//      * @throws RuntimeException if the scene could not be loaded properly
//      */
//     protected Scene getScene(final FxmlComponent component) {
//         return easyFxml
//             .load(component)
//             .getNode()
//             .map(Scene::new)
//             .getOrElseThrow((Function<? super Throwable, RuntimeException>) RuntimeException::new);
//     }
// 
//     private void setTheme(final FxmlStylesheet stylesheet, Stage mainStage) {
//         Try.of(() -> stylesheet)
//            .mapTry(FxmlStylesheet::getExternalForm)
//            .mapTry(stylesheetUri -> Stages.setStylesheet(mainStage, stylesheetUri))
//            .orElseRun(err -> ExceptionHandler.displayExceptionPane(
//                "Could not load theme!",
//                "Could not load theme file with description : " + stylesheet,
//                err
//            ));
//     }
// 
//     @Autowired
//     public void setEasyFxml(EasyFxml easyFxml) {
//         this.easyFxml = easyFxml;
//     }
// 
// }
// 
// Path: easyfxml/src/main/java/moe/tristan/easyfxml/api/FxmlComponent.java
// public interface FxmlComponent {
// 
//     FxmlFile getFile();
// 
//     Class<? extends FxmlController> getControllerClass();
// 
// }
// 
// Path: easyfxml-samples/easyfxml-sample-form-user/src/main/java/moe/tristan/easyfxml/samples/form/user/view/userform/UserFormComponent.java
// @Component
// public class UserFormComponent implements FxmlComponent {
// 
//     @Override
//     public FxmlFile getFile() {
//         return () -> "UserForm.fxml";
//     }
// 
//     @Override
//     public Class<? extends FxmlController> getControllerClass() {
//         return UserFormController.class;
//     }
// 
// }


import org.springframework.stereotype.Component;
import moe.tristan.easyfxml.FxUiManager;
import moe.tristan.easyfxml.api.FxmlComponent;
import moe.tristan.easyfxml.samples.form.user.view.userform.UserFormComponent;
/*
 * Copyright 2017 - 2019 EasyFXML project and contributors
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package moe.tristan.easyfxml.samples.form.user.view;



@Component
public class UserFormUiManager extends FxUiManager {

// Path: easyfxml/src/main/java/moe/tristan/easyfxml/FxUiManager.java
// public abstract class FxUiManager {
// 
//     private static final Logger LOGGER = LoggerFactory.getLogger(FxUiManager.class);
// 
//     private EasyFxml easyFxml;
// 
//     /**
//      * Called by {@link FxApplication} after Spring and JavaFX are started. This is the equivalent of {@link javafx.application.Application#start(Stage)} in
//      * traditional JavaFX apps.
//      *
//      * @param mainStage A reference to the main stage of the application, received from JavaFX via {@link javafx.application.Application#start(Stage)}.
//      */
//     public void startGui(final Stage mainStage) {
//         try {
//             onStageCreated(mainStage);
//             final Scene mainScene = getScene(mainComponent());
//             onSceneCreated(mainScene);
//             mainStage.setScene(mainScene);
//             mainStage.setTitle(title());
// 
//             Option.ofOptional(getStylesheet())
//                   .filter(style -> !FxmlStylesheets.DEFAULT_JAVAFX_STYLE.equals(style))
//                   .peek(stylesheet -> this.setTheme(stylesheet, mainStage));
// 
//             mainStage.show();
//         } catch (Throwable t) {
//             throw new RuntimeException("There was a failure during start-up of the application.", t);
//         }
//     }
// 
//     /**
//      * @return The title to give the main stage
//      */
//     protected abstract String title();
// 
//     /**
//      * @return The component to load in the main stage upon startup
//      */
//     protected abstract FxmlComponent mainComponent();
// 
//     /**
//      * Called right after the main {@link Scene} was created if you want to edit it.
//      *
//      * @param mainScene The main scene of the application
//      */
//     @SuppressWarnings("unused")
//     protected void onSceneCreated(final Scene mainScene) {
//         //do nothing by default
//     }
// 
//     /**
//      * Called as we enter the {@link #startGui(Stage)} method.
//      *
//      * @param mainStage The main stage, supplied by JavaFX's {@link javafx.application.Application#start(Stage)} method.
//      */
//     @SuppressWarnings("unused")
//     protected void onStageCreated(final Stage mainStage) {
//         //do nothing by default
//     }
// 
//     /**
//      * @return If overriden, this function returns the {@link FxmlStylesheet} to apply to the main window.
//      */
//     protected Optional<FxmlStylesheet> getStylesheet() {
//         return Optional.empty();
//     }
// 
//     /**
//      * Simple utility class to load an {@link FxmlComponent} as a {@link Scene} for use with {@link #mainComponent()}
//      *
//      * @param component the component to load in the {@link Scene}
//      *
//      * @return The ready-to-use {@link Scene}
//      *
//      * @throws RuntimeException if the scene could not be loaded properly
//      */
//     protected Scene getScene(final FxmlComponent component) {
//         return easyFxml
//             .load(component)
//             .getNode()
//             .map(Scene::new)
//             .getOrElseThrow((Function<? super Throwable, RuntimeException>) RuntimeException::new);
//     }
// 
//     private void setTheme(final FxmlStylesheet stylesheet, Stage mainStage) {
//         Try.of(() -> stylesheet)
//            .mapTry(FxmlStylesheet::getExternalForm)
//            .mapTry(stylesheetUri -> Stages.setStylesheet(mainStage, stylesheetUri))
//            .orElseRun(err -> ExceptionHandler.displayExceptionPane(
//                "Could not load theme!",
//                "Could not load theme file with description : " + stylesheet,
//                err
//            ));
//     }
// 
//     @Autowired
//     public void setEasyFxml(EasyFxml easyFxml) {
//         this.easyFxml = easyFxml;
//     }
// 
// }
// 
// Path: easyfxml/src/main/java/moe/tristan/easyfxml/api/FxmlComponent.java
// public interface FxmlComponent {
// 
//     FxmlFile getFile();
// 
//     Class<? extends FxmlController> getControllerClass();
// 
// }
// 
// Path: easyfxml-samples/easyfxml-sample-form-user/src/main/java/moe/tristan/easyfxml/samples/form/user/view/userform/UserFormComponent.java
// @Component
// public class UserFormComponent implements FxmlComponent {
// 
//     @Override
//     public FxmlFile getFile() {
//         return () -> "UserForm.fxml";
//     }
// 
//     @Override
//     public Class<? extends FxmlController> getControllerClass() {
//         return UserFormController.class;
//     }
// 
// }


// Path: easyfxml-samples/easyfxml-sample-form-user/src/main/java/moe/tristan/easyfxml/samples/form/user/view/UserFormUiManager.java
import org.springframework.stereotype.Component;
import moe.tristan.easyfxml.FxUiManager;
import moe.tristan.easyfxml.api.FxmlComponent;
import moe.tristan.easyfxml.samples.form.user.view.userform.UserFormComponent;

/*
 * Copyright 2017 - 2019 EasyFXML project and contributors
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package moe.tristan.easyfxml.samples.form.user.view;



@Component
public class UserFormUiManager extends FxUiManager {

    private final UserFormComponent userFormComponent;