Class RegisterResultController
java.lang.Object
edu.ntnu.idatt1002.g106.handballapp.finalprod.controller.RegisterResultController
- All Implemented Interfaces:
javafx.fxml.Initializable
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private javafx.scene.control.TextField
private javafx.scene.control.ChoiceBox<String>
private javafx.scene.control.TextField
private Match
private javafx.scene.control.TableView<Match>
private javafx.scene.control.TextField
private javafx.scene.control.ChoiceBox<String>
private Tournament
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
initialize
(URL url, ResourceBundle resourceBundle) void
insertSelectedMatchInfo
(Match match) This method changes the selections for the register result input boxesvoid
method for log outvoid
method for registering new results when a match is donevoid
setInfo()
This method sets the standard input for the team text fields.void
this method auto-fills all information for a selected matchvoid
toFrontPage
(javafx.event.ActionEvent event) method that sends program to specific screenvoid
toHelpPage
(javafx.event.ActionEvent event) method that sends program to specific screenvoid
toMainPage
(javafx.event.ActionEvent event) method that sends program to specific screenvoid
toSetUpMatches
(javafx.event.ActionEvent event) method that sends program to specific screenvoid
toTeamRegister
(javafx.event.ActionEvent event) method that sends program to specific screenvoid
This method places a listener on the matchID input text field.void
This method attaches the event handler setOnMouseClicked on the match table in order to autofill the input fields if a match is clicked.void
trackTeamInput
(javafx.scene.control.ChoiceBox<String> teamChoice) This method places a listener on the two team input choice boxes.private void
method for updating table view
-
Field Details
-
tournament
-
matchTable
-
matchTime
-
matchPlayers
-
matchID
-
scoreID
-
leftTeamChoiceBox
-
leftGoalsInput
private javafx.scene.control.TextField leftGoalsInput -
rightTeamChoiceBox
-
rightGoalsInput
private javafx.scene.control.TextField rightGoalsInput -
matchIDInput
private javafx.scene.control.TextField matchIDInput -
matchSelected
-
choiceBoxes
-
chosenChoiceBox
private int chosenChoiceBox
-
-
Constructor Details
-
RegisterResultController
public RegisterResultController()
-
-
Method Details
-
initialize
- Specified by:
initialize
in interfacejavafx.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
method that sends program to specific screen- Parameters:
event
- button event- Throws:
IOException
- when path not found
-
toMainPage
method that sends program to specific screen- Parameters:
event
- button event- Throws:
IOException
- when path not found
-
toTeamRegister
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
method that sends program to specific screen- Parameters:
event
- button event- Throws:
IOException
- when path not found
-
insertSelectedMatchInfo
This method changes the selections for the register result input boxes- Parameters:
match
- Selected match
-
logOutButton
public void logOutButton()method for log out -
toHelpPage
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
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.
-