Package scheduler.controller
Class CustomersDetailController
- java.lang.Object
-
- scheduler.controller.CustomersDetailController
-
- All Implemented Interfaces:
javafx.fxml.Initializable
public class CustomersDetailController extends java.lang.Object implements javafx.fxml.InitializableController for the Customer Detail UI
-
-
Field Summary
Fields Modifier and Type Field Description private javafx.scene.control.ButtonbuttonAddNewCustomerprivate javafx.scene.control.ButtonbuttonAppointmentsprivate javafx.scene.control.ButtonbuttonCustomersprivate javafx.scene.control.ButtonbuttonDeleteprivate javafx.scene.control.ButtonbuttonLogoutprivate javafx.scene.control.ButtonbuttonModifyprivate javafx.scene.control.ButtonbuttonOverviewprivate javafx.scene.control.ButtonbuttonReportsprivate javafx.scene.control.ButtonbuttonReturnprivate javafx.scene.control.ButtonbuttonSearchprivate javafx.scene.control.LabellabelAddressprivate javafx.scene.control.LabellabelCountryprivate javafx.scene.control.LabellabelCustomerIDprivate javafx.scene.control.LabellabelCustomerNameprivate javafx.scene.control.LabellabelDivisionIDprivate javafx.scene.control.LabellabelPhoneNumberprivate javafx.scene.control.LabellabelPostalCodestatic CustomerpassedParameters(package private) javafx.scene.Parentscene(package private) javafx.stage.Stagestageprivate javafx.scene.control.TextFieldtextfieldSearch
-
Constructor Summary
Constructors Constructor Description CustomersDetailController()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(java.net.URL url, java.util.ResourceBundle resourceBundle)Initializes the Customers Detail Controller(package private) voidonClickAddNewCustomer(javafx.event.ActionEvent event)When the "Add new customer" button is clicked it loads the add customer screen(package private) voidonClickAppointments(javafx.event.ActionEvent event)Navigates the user to the Appointments screen when they click on the APPOINTMENT button on the main menu(package private) voidonClickCustomers(javafx.event.ActionEvent event)Navigates the user to the Customers screen when they click on the CUSTOMER button on the main menu(package private) voidonClickDelete(javafx.event.ActionEvent event)Handler for when the DELETE button is clicked.(package private) voidonClickLogOut(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) voidonClickModify(javafx.event.ActionEvent event)Loads the Customer Modify screen(package private) voidonClickOverview(javafx.event.ActionEvent event)Navigates the user to the Overview page, when they click on the OVERVIEW button on the main menu.(package private) voidonClickReports(javafx.event.ActionEvent event)Navigates the user to the Reports page, when they click on the REPORTS button on the main menu.(package private) voidonClickReturnToList(javafx.event.ActionEvent event)Return to the customer overview page when the button is pressedstatic voidpassParameters(Customer passed)A customer is passed from the Customers Overview screen, and displayed on the Customer detail page.
-
-
-
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
-
-
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.IOExceptionWhen 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.IOExceptionReturn 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.IOExceptionHandler 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.IOExceptionLoads the Customer Modify screen- Parameters:
event-- Throws:
java.io.IOException
-
onClickAppointments
void onClickAppointments(javafx.event.ActionEvent event) throws java.io.IOExceptionNavigates 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.IOExceptionNavigates 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.IOExceptionNavigates 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.IOExceptionNavigates 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.IOExceptionNavigates 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:
initializein interfacejavafx.fxml.Initializable- Parameters:
url-resourceBundle-
-
-