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
    Modifier and Type
    Field
    Description
     
    static Region
     
    static int
     

    Fields inherited from class javafx.application.Application

    STYLESHEET_CASPIAN, STYLESHEET_MODENA
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    findID(String tournamentName)
    method that finds the id of a tournament
    void
    static void
    main(String[] args)
    main method that starts the application
    private static TournamentRegister
    Method for removing expired tournaments from the tournamentRegister given in param
    static String
    method that removes spaces when needed, used for creating an id for tournaments
    static void
    Setter for the chosen region
    static void
    setChosenTournament(int tournamentID)
    method that sets tournament to a specific tournament ID
    void
    start(javafx.stage.Stage stage)
    stating method with starting screen
    private static void
    Method for starting data saved in program file
    void

    Methods inherited from class javafx.application.Application

    getHostServices, getParameters, getUserAgentStylesheet, launch, launch, notifyPreloader, setUserAgentStylesheet

    Methods inherited from class java.lang.Object

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

    • adminList

      public static List<Administrator> adminList
    • chosenTournament

      public static int chosenTournament
    • chosenRegion

      public static Region chosenRegion
  • Constructor Details

    • HandballApplication

      public HandballApplication()
  • Method Details

    • main

      public static void main(String[] args)
      main method that starts the application
      Parameters:
      args -
    • start

      public void start(javafx.stage.Stage stage) throws Exception
      stating method with starting screen
      Specified by:
      start in class javafx.application.Application
      Parameters:
      stage - starting stage
      Throws:
      Exception - when path not found
    • init

      public void init() throws Exception
      Overrides:
      init in class javafx.application.Application
      Throws:
      Exception
    • stop

      public void stop() throws Exception
      Overrides:
      stop in class javafx.application.Application
      Throws:
      Exception
    • removeExpiredTournaments

      private static TournamentRegister removeExpiredTournaments(TournamentRegister tournamentRegister)
      Method for removing expired tournaments from the tournamentRegister given in param
      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

      public static void setChosenRegion(String region)
      Setter for the chosen region
      Parameters:
      region - chosen region
    • removeSpaces

      public static String removeSpaces(String text)
      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

      public static int findID(String tournamentName)
      method that finds the id of a tournament
      Parameters:
      tournamentName - tournament that we want to find ID for
      Returns:
      ID as an int