Class SetUpTournamentController

java.lang.Object
edu.ntnu.idatt1002.g106.handballapp.finalprod.controller.SetUpTournamentController
All Implemented Interfaces:
javafx.fxml.Initializable

public class SetUpTournamentController extends Object implements javafx.fxml.Initializable
this class has the different methods and fields necessary for creating new tournaments
Author:
Gruppe 6
  • Field Details

    • tournament

      private Tournament tournament
    • tournamentNameTextFieldInput

      private javafx.scene.control.TextField tournamentNameTextFieldInput
    • tournamentPlaceTextFieldInput

      private javafx.scene.control.TextField tournamentPlaceTextFieldInput
    • tournamentLayoutInput

      private javafx.scene.control.ChoiceBox<String> tournamentLayoutInput
    • tournamentNumFieldsInput

      private javafx.scene.control.ChoiceBox<Integer> tournamentNumFieldsInput
    • tournamentStartDateInput

      private javafx.scene.control.DatePicker tournamentStartDateInput
    • tournamentEndDateInput

      private javafx.scene.control.DatePicker tournamentEndDateInput
    • layoutImageView

      private javafx.scene.image.ImageView layoutImageView
    • choosenFormat

      private String choosenFormat
    • layoutText

      private javafx.scene.text.Text layoutText
  • Constructor Details

    • SetUpTournamentController

      public SetUpTournamentController()
  • Method Details

    • initialize

      public void initialize(URL url, ResourceBundle resourceBundle)
      Specified by:
      initialize in interface javafx.fxml.Initializable
      Parameters:
      url -
      resourceBundle -
    • getImageByName

      private javafx.scene.image.Image getImageByName(String imageName)
      Method sets an image by the image name The method requires that all images is located in the resources under TournamentPictures and that the image is png
      Parameters:
      imageName - The name of the image
      Returns:
      The image if found
    • setImageOn

      public void setImageOn()
      method that sets a specific image on the screen when chosen by user
    • confirmTournament

      public void confirmTournament(javafx.event.ActionEvent actionEvent) throws IOException
      method for confirming when a new tournament i to be created
      Parameters:
      actionEvent - button event
      Throws:
      IOException
    • toRegionChoice

      public void toRegionChoice(javafx.event.ActionEvent event) throws IOException
      method that sends program to specific screen
      Parameters:
      event - button event
      Throws:
      IOException - when path not found
    • logOutButton

      private void logOutButton()
      log out method