Class MatchController
java.lang.Object
edu.ntnu.idatt1002.k01g08.fta.guiControllers.MatchController
Controller for the match page
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidawayGoal(javafx.event.ActionEvent actionEvent) Lets the user log a goal to the away teamvoidawayInj(javafx.event.ActionEvent actionEvent) Lets the user log an injury to a player on the away teamvoidawayRedCard(javafx.event.ActionEvent actionEvent) Lets the user log a red car to a player on the away teamvoidawaySub(javafx.event.ActionEvent actionEvent) Lets the user log a substitution on the away teamvoidawayYellowCard(javafx.event.ActionEvent actionEvent) Lets the user log a yellow card to a player on the away teamvoidbackButtonClick(javafx.event.Event event) Goes to the last page view when the user clicks on the back buttonvoidbackButtonEnter(javafx.scene.input.KeyEvent event) Enables user to use enter key to use the back buttonvoidexitButtonClick(javafx.event.Event event) Goes to the main page view when the user clicks on the home buttonvoidhomeButtonEnter(javafx.scene.input.KeyEvent event) Enables user to use enter key to go to the home pagevoidhomeGoal(javafx.event.ActionEvent actionEvent) Lets the user log a goal to the home teamvoidhomeInj(javafx.event.ActionEvent actionEvent) Lets the user set an injured player on the home teamvoidhomeRedCard(javafx.event.ActionEvent actionEvent) Lets the user log a red card to a player on the home teamvoidhomeSub(javafx.event.ActionEvent actionEvent) Lets the home team make a substitutionvoidhomeYellowCard(javafx.event.ActionEvent actionEvent) Gives yellow card to a player on the home teamvoidDeprecated.voidnext(javafx.event.ActionEvent actionEvent) Lets the user go to the next half.voidreportButtonClick(javafx.event.Event event) Goes to the report page view when the user clicks on the report buttonvoidreportButtonEnter(javafx.scene.input.KeyEvent event) Enables user to use enter key to go to the report pagevoidsettingsButtonClick(javafx.event.Event event) Goes to the settings view when user clicks on the settings buttonvoidsettingsButtonEnter(javafx.scene.input.KeyEvent event) Enables user to use enter key to go to the settings pagevoidundo(javafx.event.ActionEvent actionEvent) Lets the user undo the last GameEvent when clicking the undo button, only works on goalsvoidUpdates time clock during the match
-
Constructor Details
-
MatchController
public MatchController()
-
-
Method Details
-
initialize
Deprecated.Initializes the view on load. -
updateTime
public void updateTime()Updates time clock during the match -
settingsButtonClick
Goes to the settings view when user clicks on the settings button- Parameters:
event- Click event- Throws:
IOException- if an error occurs
-
reportButtonClick
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
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
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
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
Enables user to use enter key to go to the settings page- Parameters:
event- KeyEvent- Throws:
IOException- if an error occurs
-
reportButtonEnter
Enables user to use enter key to go to the report page- Parameters:
event- KeyEvent- Throws:
IOException- if an error occurs
-
backButtonEnter
Enables user to use enter key to use the back button- Parameters:
event- KeyEvent- Throws:
IOException- if an error occurs
-
homeButtonEnter
Enables user to use enter key to go to the home page- Parameters:
event- KeyEvent- Throws:
IOException- if an error occurs
-