Class HandballApplication
java.lang.Object
javafx.application.Application
edu.ntnu.idatt1002.g106.handballapp.finalprod.controller.HandballApplication
public class HandballApplication
extends javafx.application.Application
Starting class extends application. hase basic information that fills the application
- Author:
- Gruppe 6
-
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 int
method that finds the id of a tournamentvoid
init()
static void
main method that starts the applicationprivate static TournamentRegister
removeExpiredTournaments
(TournamentRegister tournamentRegister) Method for removing expired tournaments from the tournamentRegister given inparam
static String
removeSpaces
(String text) method that removes spaces when needed, used for creating an id for tournamentsstatic void
setChosenRegion
(String region) Setter for the chosen regionstatic void
setChosenTournament
(int tournamentID) method that sets tournament to a specific tournament IDvoid
start
(javafx.stage.Stage stage) stating method with starting screenprivate static void
Method for starting data saved in program filevoid
stop()
Methods inherited from class javafx.application.Application
getHostServices, getParameters, getUserAgentStylesheet, launch, launch, notifyPreloader, setUserAgentStylesheet
-
Field Details
-
adminList
-
chosenTournament
public static int chosenTournament -
chosenRegion
-
-
Constructor Details
-
HandballApplication
public HandballApplication()
-
-
Method Details
-
main
main method that starts the application- Parameters:
args
-
-
start
stating method with starting screen- Specified by:
start
in classjavafx.application.Application
- Parameters:
stage
- starting stage- Throws:
Exception
- when path not found
-
init
- Overrides:
init
in classjavafx.application.Application
- Throws:
Exception
-
stop
- Overrides:
stop
in classjavafx.application.Application
- Throws:
Exception
-
removeExpiredTournaments
Method for removing expired tournaments from the tournamentRegister given inparam
- Parameters:
tournamentRegister
- TournamentRegister to check for expired tournaments and eventually remove tournaments from
-
startData
private static void startData()Method for starting data saved in program file -
setChosenTournament
public static void setChosenTournament(int tournamentID) method that sets tournament to a specific tournament ID- Parameters:
tournamentID
- id of the wanted tournament
-
setChosenRegion
Setter for the chosen region- Parameters:
region
- chosen region
-
removeSpaces
method that removes spaces when needed, used for creating an id for tournaments- Parameters:
text
- the text that id is going to bee created for- Returns:
- resultWord
-
findID
method that finds the id of a tournament- Parameters:
tournamentName
- tournament that we want to find ID for- Returns:
- ID as an int
-