java.lang.Object
edu.ntnu.idatt1002.k01g08.fta.guiControllers.MatchController

public class MatchController extends Object
Controller for the match page
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    awayGoal(javafx.event.ActionEvent actionEvent)
    Lets the user log a goal to the away team
    void
    awayInj(javafx.event.ActionEvent actionEvent)
    Lets the user log an injury to a player on the away team
    void
    awayRedCard(javafx.event.ActionEvent actionEvent)
    Lets the user log a red car to a player on the away team
    void
    awaySub(javafx.event.ActionEvent actionEvent)
    Lets the user log a substitution on the away team
    void
    awayYellowCard(javafx.event.ActionEvent actionEvent)
    Lets the user log a yellow card to a player on the away team
    void
    backButtonClick(javafx.event.Event event)
    Goes to the last page view when the user clicks on the back button
    void
    backButtonEnter(javafx.scene.input.KeyEvent event)
    Enables user to use enter key to use the back button
    void
    exitButtonClick(javafx.event.Event event)
    Goes to the main page view when the user clicks on the home button
    void
    homeButtonEnter(javafx.scene.input.KeyEvent event)
    Enables user to use enter key to go to the home page
    void
    homeGoal(javafx.event.ActionEvent actionEvent)
    Lets the user log a goal to the home team
    void
    homeInj(javafx.event.ActionEvent actionEvent)
    Lets the user set an injured player on the home team
    void
    homeRedCard(javafx.event.ActionEvent actionEvent)
    Lets the user log a red card to a player on the home team
    void
    homeSub(javafx.event.ActionEvent actionEvent)
    Lets the home team make a substitution
    void
    homeYellowCard(javafx.event.ActionEvent actionEvent)
    Gives yellow card to a player on the home team
    void
    Deprecated.
    void
    next(javafx.event.ActionEvent actionEvent)
    Lets the user go to the next half.
    void
    reportButtonClick(javafx.event.Event event)
    Goes to the report page view when the user clicks on the report button
    void
    reportButtonEnter(javafx.scene.input.KeyEvent event)
    Enables user to use enter key to go to the report page
    void
    settingsButtonClick(javafx.event.Event event)
    Goes to the settings view when user clicks on the settings button
    void
    settingsButtonEnter(javafx.scene.input.KeyEvent event)
    Enables user to use enter key to go to the settings page
    void
    undo(javafx.event.ActionEvent actionEvent)
    Lets the user undo the last GameEvent when clicking the undo button, only works on goals
    void
    Updates time clock during the match

    Methods inherited from class java.lang.Object

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

    • MatchController

      public MatchController()
  • Method Details

    • initialize

      @Deprecated public void initialize()
      Deprecated.
      Initializes the view on load.
    • updateTime

      public void updateTime()
      Updates time clock during the match
    • settingsButtonClick

      public void settingsButtonClick(javafx.event.Event event) throws IOException
      Goes to the settings view when user clicks on the settings button
      Parameters:
      event - Click event
      Throws:
      IOException - if an error occurs
    • reportButtonClick

      public void reportButtonClick(javafx.event.Event event) throws IOException
      Goes to the report page view when the user clicks on the report button
      Parameters:
      event - Click event
      Throws:
      IOException - if an error occurs
    • exitButtonClick

      public void exitButtonClick(javafx.event.Event event) throws IOException
      Goes to the main page view when the user clicks on the home button
      Parameters:
      event - Click event
      Throws:
      IOException - if an error occurs
    • backButtonClick

      public void backButtonClick(javafx.event.Event event) throws IOException
      Goes to the last page view when the user clicks on the back button
      Parameters:
      event - Click event
      Throws:
      IOException - if an error occurs
    • homeSub

      public void homeSub(javafx.event.ActionEvent actionEvent)
      Lets the home team make a substitution
      Parameters:
      actionEvent - Click Event
    • homeYellowCard

      public void homeYellowCard(javafx.event.ActionEvent actionEvent)
      Gives yellow card to a player on the home team
      Parameters:
      actionEvent - Click Event
    • homeInj

      public void homeInj(javafx.event.ActionEvent actionEvent)
      Lets the user set an injured player on the home team
      Parameters:
      actionEvent -
    • awayGoal

      public void awayGoal(javafx.event.ActionEvent actionEvent)
      Lets the user log a goal to the away team
      Parameters:
      actionEvent -
    • awayYellowCard

      public void awayYellowCard(javafx.event.ActionEvent actionEvent)
      Lets the user log a yellow card to a player on the away team
      Parameters:
      actionEvent - Click Event
    • awayInj

      public void awayInj(javafx.event.ActionEvent actionEvent)
      Lets the user log an injury to a player on the away team
      Parameters:
      actionEvent - Click Event
    • homeGoal

      public void homeGoal(javafx.event.ActionEvent actionEvent)
      Lets the user log a goal to the home team
      Parameters:
      actionEvent - Click Event
    • awaySub

      public void awaySub(javafx.event.ActionEvent actionEvent)
      Lets the user log a substitution on the away team
      Parameters:
      actionEvent - Click Event
    • awayRedCard

      public void awayRedCard(javafx.event.ActionEvent actionEvent)
      Lets the user log a red car to a player on the away team
      Parameters:
      actionEvent - Click Event
    • homeRedCard

      public void homeRedCard(javafx.event.ActionEvent actionEvent)
      Lets the user log a red card to a player on the home team
      Parameters:
      actionEvent - Click Event
    • undo

      public void undo(javafx.event.ActionEvent actionEvent)
      Lets the user undo the last GameEvent when clicking the undo button, only works on goals
      Parameters:
      actionEvent - Click Event
    • next

      public void next(javafx.event.ActionEvent actionEvent) throws IOException
      Lets the user go to the next half. Checks whether extra time and penalties is required. Goes to match report when the game is finished
      Parameters:
      actionEvent - Click Event
      Throws:
      IOException - if an error occurs
    • settingsButtonEnter

      public void settingsButtonEnter(javafx.scene.input.KeyEvent event) throws IOException
      Enables user to use enter key to go to the settings page
      Parameters:
      event - KeyEvent
      Throws:
      IOException - if an error occurs
    • reportButtonEnter

      public void reportButtonEnter(javafx.scene.input.KeyEvent event) throws IOException
      Enables user to use enter key to go to the report page
      Parameters:
      event - KeyEvent
      Throws:
      IOException - if an error occurs
    • backButtonEnter

      public void backButtonEnter(javafx.scene.input.KeyEvent event) throws IOException
      Enables user to use enter key to use the back button
      Parameters:
      event - KeyEvent
      Throws:
      IOException - if an error occurs
    • homeButtonEnter

      public void homeButtonEnter(javafx.scene.input.KeyEvent event) throws IOException
      Enables user to use enter key to go to the home page
      Parameters:
      event - KeyEvent
      Throws:
      IOException - if an error occurs