Package visuals

Class Navigaattori


public class Navigaattori extends Application
Navigator is the starting point for the javaFX application, and handles scenechanges. Implemented as a singleton.
  • Field Details

    • instance

      private static Navigaattori instance
      Singleton instance
    • MAINSTAGE

      private static Stage MAINSTAGE
      Main stage
    • camera

      public static final PerspectiveCamera camera
      Camera handles the animated transitions between scenes
  • Constructor Details

    • Navigaattori

      public Navigaattori()
  • Method Details

    • main

      public static void main(String[] args)
      Main method that launches the application
      Parameters:
      args - command line arguments (we use none)
    • getInstance

      public static Navigaattori getInstance()
      Returns instance of the singleton
      Returns:
      instance of the singleton
    • changeScene

      public void changeScene(ModeType type) throws IOException
      Changes the scene to the given mode
      Parameters:
      type - mode to change to
      Throws:
      IOException - if the fxml file is not found
    • start

      public void start(Stage stage) throws Exception
      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:
      start in class Application
      Throws:
      Exception