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 inherited from class javafx.application.Application
STYLESHEET_CASPIAN, STYLESHEET_MODENA
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
changeScene
(String sceneFileName) Changes the scene of the stage.static javafx.stage.Stage
getStage()
Gets the main stage for the programstatic void
Method called from Main when the program is run Calls on launch in Applicationvoid
start
(javafx.stage.Stage startStage) Overridden from Application.Methods inherited from class javafx.application.Application
getHostServices, getParameters, getUserAgentStylesheet, init, launch, launch, notifyPreloader, setUserAgentStylesheet, stop
-
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 classjavafx.application.Application
- Parameters:
startStage
- - Stage - the stage provided by javaFX
-
run
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
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.
-