java.lang.Object
edu.ntnu.idatt1002.k01g08.fta.util.SceneManager

public class SceneManager extends Object
Class used to switch scene
  • Constructor Details

    • SceneManager

      public SceneManager()
      Constructor
  • Method Details

    • setView

      public static void setView(String viewFxml) throws IOException
      Method for setting the view
      Parameters:
      viewFxml - is the name of the fxml file
      Throws:
      IOException - if the view couldn't be loaded
    • goToLastScene

      public static void goToLastScene() throws IOException
      Method for going to the last scene
      Throws:
      IOException - if the view couldn't be loaded
    • getLoader

      public static javafx.fxml.FXMLLoader getLoader(String fileName)
      Retrieves the FXML loader
      Parameters:
      fileName - is the name of the FXML file
      Returns:
      the FXMLLoader
    • setScene

      public static void setScene(javafx.scene.Scene scene)
      Sets the scenes
      Parameters:
      scene - is the scene being set
    • setCurrentScene

      public static void setCurrentScene(String sceneName)
      Sets the current scene
      Parameters:
      sceneName - is the name of the scene
    • getScene

      public static javafx.scene.Scene getScene()
      Retrieves a scene
      Returns:
      the scene
    • getStage

      public static javafx.stage.Stage getStage()
      Retrieves a stage
      Returns:
      the stage