Package edu.ntnu.idatt1002.k2g05
Class View
java.lang.Object
edu.ntnu.idatt1002.k2g05.View
Singleton class for managing the current view.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionjavafx.scene.Scene
Method for getting the currently set scene, the scene is the content of the window.static View
Method for getting the instance of the View class.javafx.stage.Stage
getStage()
Gets the stage, the stage is the window frame, and can be seen as the parent of the view.boolean
void
setCurrentScene
(String path) Sets the current scene, it is preferred to use the static constants in this class to set a scene, as they will be correct.void
setCurrentScene
(javafx.scene.Scene currentScene) Method for setting the current scene, the scene is the content of the window.void
setDebugMode
(boolean b) void
setStage
(javafx.stage.Stage stage) Sets the stage, the stage is the window frame, and can be seen as the parent of the view.
-
Field Details
-
OPENING_VIEW
- See Also:
-
NEW_TOURNAMENT_VIEW_1
- See Also:
-
NEW_TOURNAMENT_VIEW_2
- See Also:
-
NEW_TOURNAMENT_VIEW_3
- See Also:
-
NEW_TOURNAMENT_VIEW_4
- See Also:
-
OPEN_TOURNAMENT_SCORE_REGISTRATION
- See Also:
-
OPEN_TOURNAMENT_SCORE_SUMMARY
- See Also:
-
OPEN_TOURNAMENT_MATCH_REGISTRATION
- See Also:
-
OPEN_TOURNAMENT_MATCH_SUMMARY
- See Also:
-
OPEN_TOURNAMENT_FINALS_REGISTRATION
- See Also:
-
OPEN_TOURNAMENT_FINALS_SUMMARY
- See Also:
-
-
Method Details
-
getInstance
Method for getting the instance of the View class.- Returns:
- the instance
-
getStage
public javafx.stage.Stage getStage()Gets the stage, the stage is the window frame, and can be seen as the parent of the view.- Returns:
- the stages
-
setStage
public void setStage(javafx.stage.Stage stage) Sets the stage, the stage is the window frame, and can be seen as the parent of the view.- Parameters:
stage
- to be set.
-
getCurrentScene
public javafx.scene.Scene getCurrentScene()Method for getting the currently set scene, the scene is the content of the window.- Returns:
- the scene
-
setCurrentScene
public void setCurrentScene(javafx.scene.Scene currentScene) Method for setting the current scene, the scene is the content of the window.- Parameters:
currentScene
- to be set
-
setCurrentScene
Sets the current scene, it is preferred to use the static constants in this class to set a scene, as they will be correct.- Parameters:
path
- to FXML file- Throws:
IllegalArgumentException
- if the path is wrong or the file is wrong.
-
isDebugMode
public boolean isDebugMode() -
setDebugMode
public void setDebugMode(boolean b)
-