Package visuals
Class Navigaattori
java.lang.Object
javafx.application.Application
visuals.Navigaattori
Navigator is the starting point for the javaFX application, and handles scenechanges.
Implemented as a singleton.
-
Nested Class Summary
Nested classes/interfaces inherited from class javafx.application.Application
Application.Parameters -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PerspectiveCameraCamera handles the animated transitions between scenesprivate static NavigaattoriSingleton instanceprivate static StageMain stageFields inherited from class javafx.application.Application
STYLESHEET_CASPIAN, STYLESHEET_MODENA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeScene(ModeType type) Changes the scene to the given modestatic NavigaattoriReturns instance of the singletonstatic voidMain method that launches the applicationvoidThis is what gets called by main method.Methods inherited from class javafx.application.Application
getHostServices, getParameters, getUserAgentStylesheet, init, launch, launch, notifyPreloader, setUserAgentStylesheet, stop
-
Field Details
-
instance
Singleton instance -
MAINSTAGE
Main stage -
camera
Camera handles the animated transitions between scenes
-
-
Constructor Details
-
Navigaattori
public Navigaattori()
-
-
Method Details
-
main
Main method that launches the application- Parameters:
args- command line arguments (we use none)
-
getInstance
Returns instance of the singleton- Returns:
- instance of the singleton
-
changeScene
Changes the scene to the given mode- Parameters:
type- mode to change to- Throws:
IOException- if the fxml file is not found
-
start
This is what gets called by main method. Starts the application itself, initializes the window and plays the intro, which transitions to main menu.- Specified by:
startin classApplication- Throws:
Exception
-