Class MatchController
java.lang.Object
edu.ntnu.idatt1002.k01g08.fta.guiControllers.MatchController
Controller for the match page
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
awayGoal
(javafx.event.ActionEvent actionEvent) Lets the user log a goal to the away teamvoid
awayInj
(javafx.event.ActionEvent actionEvent) Lets the user log an injury to a player on the away teamvoid
awayRedCard
(javafx.event.ActionEvent actionEvent) Lets the user log a red car to a player on the away teamvoid
awaySub
(javafx.event.ActionEvent actionEvent) Lets the user log a substitution on the away teamvoid
awayYellowCard
(javafx.event.ActionEvent actionEvent) Lets the user log a yellow card to a player on the away teamvoid
backButtonClick
(javafx.event.Event event) Goes to the last page view when the user clicks on the back buttonvoid
backButtonEnter
(javafx.scene.input.KeyEvent event) Enables user to use enter key to use the back buttonvoid
exitButtonClick
(javafx.event.Event event) Goes to the main page view when the user clicks on the home buttonvoid
homeButtonEnter
(javafx.scene.input.KeyEvent event) Enables user to use enter key to go to the home pagevoid
homeGoal
(javafx.event.ActionEvent actionEvent) Lets the user log a goal to the home teamvoid
homeInj
(javafx.event.ActionEvent actionEvent) Lets the user set an injured player on the home teamvoid
homeRedCard
(javafx.event.ActionEvent actionEvent) Lets the user log a red card to a player on the home teamvoid
homeSub
(javafx.event.ActionEvent actionEvent) Lets the home team make a substitutionvoid
homeYellowCard
(javafx.event.ActionEvent actionEvent) Gives yellow card to a player on the home teamvoid
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 buttonvoid
reportButtonEnter
(javafx.scene.input.KeyEvent event) Enables user to use enter key to go to the report pagevoid
settingsButtonClick
(javafx.event.Event event) Goes to the settings view when user clicks on the settings buttonvoid
settingsButtonEnter
(javafx.scene.input.KeyEvent event) Enables user to use enter key to go to the settings pagevoid
undo
(javafx.event.ActionEvent actionEvent) Lets the user undo the last GameEvent when clicking the undo button, only works on goalsvoid
Updates 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
-