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
FieldsFields inherited from class javafx.application.Application
STYLESHEET_CASPIAN, STYLESHEET_MODENA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intmethod that finds the id of a tournamentvoidinit()static voidmain method that starts the applicationprivate static TournamentRegisterremoveExpiredTournaments(TournamentRegister tournamentRegister) Method for removing expired tournaments from the tournamentRegister given inparamstatic StringremoveSpaces(String text) method that removes spaces when needed, used for creating an id for tournamentsstatic voidsetChosenRegion(String region) Setter for the chosen regionstatic voidsetChosenTournament(int tournamentID) method that sets tournament to a specific tournament IDvoidstart(javafx.stage.Stage stage) stating method with starting screenprivate static voidMethod for starting data saved in program filevoidstop()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:
startin classjavafx.application.Application- Parameters:
stage- starting stage- Throws:
Exception- when path not found
-
init
- Overrides:
initin classjavafx.application.Application- Throws:
Exception
-
stop
- Overrides:
stopin 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
-