java.lang.Object
edu.ntnu.idatt1002.k01g08.fta.util.SceneManager
Class used to switch scene
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic javafx.fxml.FXMLLoader
Retrieves the FXML loaderstatic javafx.scene.Scene
getScene()
Retrieves a scenestatic javafx.stage.Stage
getStage()
Retrieves a stagestatic void
Method for going to the last scenestatic void
setCurrentScene
(String sceneName) Sets the current scenestatic void
setScene
(javafx.scene.Scene scene) Sets the scenesstatic void
Method for setting the view
-
Constructor Details
-
SceneManager
public SceneManager()Constructor
-
-
Method Details
-
setView
Method for setting the view- Parameters:
viewFxml
- is the name of the fxml file- Throws:
IOException
- if the view couldn't be loaded
-
goToLastScene
Method for going to the last scene- Throws:
IOException
- if the view couldn't be loaded
-
getLoader
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
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
-