Class RegisterResultController

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

public class RegisterResultController extends Object implements javafx.fxml.Initializable
  • Field Details

    • tournament

      private Tournament tournament
    • matchTable

      private javafx.scene.control.TableView<Match> matchTable
    • matchTime

      private javafx.scene.control.TableColumn<Match,LocalTime> matchTime
    • matchPlayers

      private javafx.scene.control.TableColumn<Match,String> matchPlayers
    • matchID

      private javafx.scene.control.TableColumn<Match,Integer> matchID
    • scoreID

      private javafx.scene.control.TableColumn<Match,String> scoreID
    • leftTeamChoiceBox

      private javafx.scene.control.ChoiceBox<String> leftTeamChoiceBox
    • leftGoalsInput

      private javafx.scene.control.TextField leftGoalsInput
    • rightTeamChoiceBox

      private javafx.scene.control.ChoiceBox<String> rightTeamChoiceBox
    • rightGoalsInput

      private javafx.scene.control.TextField rightGoalsInput
    • matchIDInput

      private javafx.scene.control.TextField matchIDInput
    • matchSelected

      private Match matchSelected
    • choiceBoxes

      private List<javafx.scene.control.ChoiceBox<String>> choiceBoxes
    • chosenChoiceBox

      private int chosenChoiceBox
  • Constructor Details

    • RegisterResultController

      public RegisterResultController()
  • Method Details

    • initialize

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

      private void updateTableView()
      method for updating table view
    • registerResult

      public void registerResult()
      method for registering new results when a match is done
    • toFrontPage

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

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

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

      public void setSelectedMatch()
      this method auto-fills all information for a selected match
    • toSetUpMatches

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

      public void insertSelectedMatchInfo(Match match)
      This method changes the selections for the register result input boxes
      Parameters:
      match - Selected match
    • logOutButton

      public void logOutButton()
      method for log out
    • toHelpPage

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

      public void trackMatchIDInput()
      This method places a listener on the matchID input text field. Using the input, if a match with the given ID exists, then the matches are pre-set.
    • trackTeamInput

      public void trackTeamInput(javafx.scene.control.ChoiceBox<String> teamChoice)
      This method places a listener on the two team input choice boxes. Using the input, the other team choices are reduced and when two teams are chosen, then the matchID is automatically set.
    • trackTableClick

      public void trackTableClick()
      This method attaches the event handler setOnMouseClicked on the match table in order to autofill the input fields if a match is clicked.
    • setInfo

      public void setInfo()
      This method sets the standard input for the team text fields.