java.lang.Object
edu.ntnu.idatt1002.g106.handballapp.finalprod.controller.MainPageController
All Implemented Interfaces:
javafx.fxml.Initializable

public class MainPageController extends Object implements javafx.fxml.Initializable
This is the mainpage class and hold information of matches, gets updated when initialized
Author:
Gruppe 6
  • Field Details

    • table

      private javafx.scene.control.TableView<Match> table
    • time

      private javafx.scene.control.TableColumn<Match,LocalDateTime> time
    • match

      private javafx.scene.control.TableColumn<Match,String> match
    • field

      private javafx.scene.control.TableColumn<Match,Integer> field
    • firstRef

      private javafx.scene.control.TableColumn<Match,Integer> firstRef
    • secondRef

      private javafx.scene.control.TableColumn<Match,Integer> secondRef
    • dateSelect

      private javafx.scene.control.DatePicker dateSelect
    • refAdd

      private javafx.scene.control.Button refAdd
    • refField

      private javafx.scene.control.TextField refField
    • refAdd2

      private javafx.scene.control.Button refAdd2
    • refField2

      private javafx.scene.control.TextField refField2
    • matchSelected

      private Match matchSelected
  • Constructor Details

    • MainPageController

      public MainPageController()
  • Method Details

    • initialize

      public void initialize(URL url, ResourceBundle resourceBundle)
      Specified by:
      initialize in interface javafx.fxml.Initializable
      Parameters:
      url -
      resourceBundle -
    • updateTableView

      private void updateTableView()
      method that updates MainPages tableView
    • 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.
    • sendToFrontPage

      public void sendToFrontPage(javafx.event.ActionEvent event) throws IOException
      method that sends program to specific screen
      Parameters:
      event - button event
      Throws:
      IOException - when path not found
    • sendToSetUpMatches

      public void sendToSetUpMatches(javafx.event.ActionEvent event) throws IOException
      method that sends program to specific screen
      Parameters:
      event - button event
      Throws:
      IOException - when path not found
    • sendToRegisterTeam

      public void sendToRegisterTeam(javafx.event.ActionEvent event) throws IOException
      method that sends program to specific screen
      Parameters:
      event - button event
      Throws:
      IOException - when path not found
    • sendToRegisterResult

      public void sendToRegisterResult(javafx.event.ActionEvent event) throws IOException
      method that sends program to specific screen
      Parameters:
      event - button event
      Throws:
      IOException - when path not found
    • selectDate

      public void selectDate()
      method that sends program to specific screen
      Throws:
      IOException - when path not found
    • toHelpPage

      public void toHelpPage(javafx.event.ActionEvent event) throws IOException
      method that sends program to specific screen
      Parameters:
      event - button event
      Throws:
      IOException - when path not found
    • setFirstReferee

      public void setFirstReferee()
    • setSecondReferee

      public void setSecondReferee()
    • logout

      public void logout()
      method for log out