java.lang.Object
javafx.application.Application
edu.ntnu.idatt2001.carljgu.client.App

public class App extends javafx.application.Application
Class that extends Application from javafx. Responsibility for creating the stage.
Version:
1.3 14.05.2022
Author:
Carl Gützkow
  • Nested Class Summary

    Nested classes/interfaces inherited from class javafx.application.Application

    javafx.application.Application.Parameters
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static javafx.stage.Stage
     

    Fields inherited from class javafx.application.Application

    STYLESHEET_CASPIAN, STYLESHEET_MODENA
  • Constructor Summary

    Constructors
    Constructor
    Description
    App()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    changeScene(String sceneFileName)
    Changes the scene of the stage.
    static javafx.stage.Stage
    Gets the main stage for the program
    static void
    run(String[] args)
    Method called from Main when the program is run Calls on launch in Application
    void
    start(javafx.stage.Stage startStage)
    Overridden from Application.

    Methods inherited from class javafx.application.Application

    getHostServices, getParameters, getUserAgentStylesheet, init, launch, launch, notifyPreloader, setUserAgentStylesheet, stop

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • stage

      private static javafx.stage.Stage stage
  • Constructor Details

    • App

      public App()
  • Method Details

    • start

      public void start(javafx.stage.Stage startStage)
      Overridden from Application. Loads in the scene and configures the stage.
      Specified by:
      start in class javafx.application.Application
      Parameters:
      startStage - - Stage - the stage provided by javaFX
    • run

      public static void run(String[] args)
      Method called from Main when the program is run Calls on launch in Application
      Parameters:
      args - - String[] - commandline arguments
    • getStage

      public static javafx.stage.Stage getStage()
      Gets the main stage for the program
      Returns:
      stage - Stage - the starting program stage
    • changeScene

      public static boolean changeScene(String sceneFileName)
      Changes the scene of the stage.
      Parameters:
      sceneFileName - String - file name with extension to the scene to change to.
      Returns:
      boolean - true if the scene was changed. False otherwise.