Class CustomersDetailController

  • All Implemented Interfaces:
    javafx.fxml.Initializable

    public class CustomersDetailController
    extends java.lang.Object
    implements javafx.fxml.Initializable
    Controller for the Customer Detail UI
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void initialize​(java.net.URL url, java.util.ResourceBundle resourceBundle)
      Initializes the Customers Detail Controller
      (package private) void onClickAddNewCustomer​(javafx.event.ActionEvent event)
      When the "Add new customer" button is clicked it loads the add customer screen
      (package private) void onClickAppointments​(javafx.event.ActionEvent event)
      Navigates the user to the Appointments screen when they click on the APPOINTMENT button on the main menu
      (package private) void onClickCustomers​(javafx.event.ActionEvent event)
      Navigates the user to the Customers screen when they click on the CUSTOMER button on the main menu
      (package private) void onClickDelete​(javafx.event.ActionEvent event)
      Handler for when the DELETE button is clicked.
      (package private) void onClickLogOut​(javafx.event.ActionEvent event)
      Navigates the user to the Login page where they are automatically logged out, when they click on the LOGOUT button on the main menu.
      (package private) void onClickModify​(javafx.event.ActionEvent event)
      Loads the Customer Modify screen
      (package private) void onClickOverview​(javafx.event.ActionEvent event)
      Navigates the user to the Overview page, when they click on the OVERVIEW button on the main menu.
      (package private) void onClickReports​(javafx.event.ActionEvent event)
      Navigates the user to the Reports page, when they click on the REPORTS button on the main menu.
      (package private) void onClickReturnToList​(javafx.event.ActionEvent event)
      Return to the customer overview page when the button is pressed
      static void passParameters​(Customer passed)
      A customer is passed from the Customers Overview screen, and displayed on the Customer detail page.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • stage

        javafx.stage.Stage stage
      • scene

        javafx.scene.Parent scene
      • passedParameters

        public static Customer passedParameters
      • buttonAddNewCustomer

        private javafx.scene.control.Button buttonAddNewCustomer
      • buttonOverview

        private javafx.scene.control.Button buttonOverview
      • buttonCustomers

        private javafx.scene.control.Button buttonCustomers
      • buttonAppointments

        private javafx.scene.control.Button buttonAppointments
      • buttonReports

        private javafx.scene.control.Button buttonReports
      • buttonLogout

        private javafx.scene.control.Button buttonLogout
      • textfieldSearch

        private javafx.scene.control.TextField textfieldSearch
      • buttonSearch

        private javafx.scene.control.Button buttonSearch
      • labelCustomerName

        private javafx.scene.control.Label labelCustomerName
      • labelCustomerID

        private javafx.scene.control.Label labelCustomerID
      • labelAddress

        private javafx.scene.control.Label labelAddress
      • labelPostalCode

        private javafx.scene.control.Label labelPostalCode
      • labelPhoneNumber

        private javafx.scene.control.Label labelPhoneNumber
      • labelCountry

        private javafx.scene.control.Label labelCountry
      • labelDivisionID

        private javafx.scene.control.Label labelDivisionID
      • buttonDelete

        private javafx.scene.control.Button buttonDelete
      • buttonModify

        private javafx.scene.control.Button buttonModify
      • buttonReturn

        private javafx.scene.control.Button buttonReturn
    • Constructor Detail

      • CustomersDetailController

        public CustomersDetailController()
    • Method Detail

      • passParameters

        public static void passParameters​(Customer passed)
        A customer is passed from the Customers Overview screen, and displayed on the Customer detail page.
        Parameters:
        passed - a customer object
      • onClickAddNewCustomer

        void onClickAddNewCustomer​(javafx.event.ActionEvent event)
                            throws java.io.IOException
        When the "Add new customer" button is clicked it loads the add customer screen
        Parameters:
        event - click on add customer button
        Throws:
        java.io.IOException - for exceptions
      • onClickReturnToList

        void onClickReturnToList​(javafx.event.ActionEvent event)
                          throws java.io.IOException
        Return to the customer overview page when the button is pressed
        Parameters:
        event - clicking the "Return to list" button
        Throws:
        java.io.IOException
      • onClickDelete

        void onClickDelete​(javafx.event.ActionEvent event)
                    throws java.io.IOException
        Handler for when the DELETE button is clicked. Asks the user for confirmation, deletes all appointments first, and then delete the customer. Loads the Customer overview page after the deletion is complete.
        Parameters:
        event -
        Throws:
        java.io.IOException
      • onClickModify

        void onClickModify​(javafx.event.ActionEvent event)
                    throws java.io.IOException
        Loads the Customer Modify screen
        Parameters:
        event -
        Throws:
        java.io.IOException
      • onClickAppointments

        void onClickAppointments​(javafx.event.ActionEvent event)
                          throws java.io.IOException
        Navigates the user to the Appointments screen when they click on the APPOINTMENT button on the main menu
        Parameters:
        event -
        Throws:
        java.io.IOException
      • onClickCustomers

        void onClickCustomers​(javafx.event.ActionEvent event)
                       throws java.io.IOException
        Navigates the user to the Customers screen when they click on the CUSTOMER button on the main menu
        Parameters:
        event -
        Throws:
        java.io.IOException
      • onClickLogOut

        void onClickLogOut​(javafx.event.ActionEvent event)
                    throws java.io.IOException
        Navigates the user to the Login page where they are automatically logged out, when they click on the LOGOUT button on the main menu. They can choose to either login again, or exit the application from the login screen.
        Parameters:
        event -
        Throws:
        java.io.IOException
      • onClickOverview

        void onClickOverview​(javafx.event.ActionEvent event)
                      throws java.io.IOException
        Navigates the user to the Overview page, when they click on the OVERVIEW button on the main menu.
        Parameters:
        event -
        Throws:
        java.io.IOException
      • onClickReports

        void onClickReports​(javafx.event.ActionEvent event)
                     throws java.io.IOException
        Navigates the user to the Reports page, when they click on the REPORTS button on the main menu.
        Parameters:
        event -
        Throws:
        java.io.IOException
      • initialize

        public void initialize​(java.net.URL url,
                               java.util.ResourceBundle resourceBundle)
        Initializes the Customers Detail Controller
        Specified by:
        initialize in interface javafx.fxml.Initializable
        Parameters:
        url -
        resourceBundle -