Class RegisterResultController
java.lang.Object
edu.ntnu.idatt1002.g106.handballapp.finalprod.controller.RegisterResultController
- All Implemented Interfaces:
javafx.fxml.Initializable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate javafx.scene.control.TextFieldprivate javafx.scene.control.ChoiceBox<String>private javafx.scene.control.TextFieldprivate Matchprivate javafx.scene.control.TableView<Match>private javafx.scene.control.TextFieldprivate javafx.scene.control.ChoiceBox<String>private Tournament -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinitialize(URL url, ResourceBundle resourceBundle) voidinsertSelectedMatchInfo(Match match) This method changes the selections for the register result input boxesvoidmethod for log outvoidmethod for registering new results when a match is donevoidsetInfo()This method sets the standard input for the team text fields.voidthis method auto-fills all information for a selected matchvoidtoFrontPage(javafx.event.ActionEvent event) method that sends program to specific screenvoidtoHelpPage(javafx.event.ActionEvent event) method that sends program to specific screenvoidtoMainPage(javafx.event.ActionEvent event) method that sends program to specific screenvoidtoSetUpMatches(javafx.event.ActionEvent event) method that sends program to specific screenvoidtoTeamRegister(javafx.event.ActionEvent event) method that sends program to specific screenvoidThis method places a listener on the matchID input text field.voidThis method attaches the event handler setOnMouseClicked on the match table in order to autofill the input fields if a match is clicked.voidtrackTeamInput(javafx.scene.control.ChoiceBox<String> teamChoice) This method places a listener on the two team input choice boxes.private voidmethod 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:
initializein 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.
-