Class FXMLPageLoader

java.lang.Object
com.example.project.services.FXMLPageLoader
All Implemented Interfaces:
PageLoader

public class FXMLPageLoader extends Object implements PageLoader
FXML Loader wrapper class for the project to load the game screen FXML pages.
  • Constructor Details

    • FXMLPageLoader

      public FXMLPageLoader()
      constructor.
  • Method Details

    • load

      public javafx.scene.Parent load(String fxmlPath) throws IOException
      Description copied from interface: PageLoader
      Load method to load fxml page.
      Specified by:
      load in interface PageLoader
      Parameters:
      fxmlPath - path to .fxml mfile.
      Returns:
      returns the fxml file root node.
      Throws:
      IOException - exception on failing.
    • getController

      public <T> T getController()
      Description copied from interface: PageLoader
      Get the .fxml pages controller
      Specified by:
      getController in interface PageLoader
      Type Parameters:
      T - controller type.
      Returns:
      page's controller.