Package scheduler.controller
Class CustomersModifyController
- java.lang.Object
-
- scheduler.controller.CustomersModifyController
-
- All Implemented Interfaces:
javafx.fxml.Initializable
public class CustomersModifyController extends java.lang.Object implements javafx.fxml.InitializableController for the Modify Customer UI
-
-
Field Summary
Fields Modifier and Type Field Description private javafx.scene.control.ButtonbuttonAddNewCustomerprivate javafx.scene.control.ButtonbuttonAppointmentsprivate javafx.scene.control.ButtonbuttonCancelprivate javafx.scene.control.ButtonbuttonCustomersprivate javafx.scene.control.ButtonbuttonLogoutprivate javafx.scene.control.ButtonbuttonOverviewprivate javafx.scene.control.ButtonbuttonReportsprivate javafx.scene.control.ButtonbuttonSaveprivate javafx.scene.control.ButtonbuttonSearchprivate javafx.scene.control.ComboBox<Country>comboCountryprivate javafx.scene.control.ComboBox<Division>comboDivisionIDprivate javafx.scene.control.LabellabelCustomerID(package private) static CustomerpassedParameters(package private) javafx.scene.Parentscene(package private) javafx.stage.Stagestageprivate javafx.scene.control.TextFieldtextfieldAddressprivate javafx.scene.control.TextFieldtextFieldNameprivate javafx.scene.control.TextFieldtextFieldPhoneNumberprivate javafx.scene.control.TextFieldtextfieldPostalCodeprivate javafx.scene.control.TextFieldtextfieldSearch
-
Constructor Summary
Constructors Constructor Description CustomersModifyController()
-
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 Modify Controller.(package private) voidonClickAddNewCustomer(javafx.event.ActionEvent event)Clicking on Add new customers loads the Add Customer screen(package private) voidonClickAppointments(javafx.event.ActionEvent event)Main menu item: Loads the appointments screen(package private) voidonClickCancel(javafx.event.ActionEvent event)Clicking cancel returns the user to the Customers Overview page.(package private) voidonClickComboCountry(javafx.event.ActionEvent event)Once a country is picked, the application with load the applicable division id's that exist within that country.(package private) voidonClickCustomers(javafx.event.ActionEvent event)Main menu item: Loads the Customers screen(package private) voidonClickLogOut(javafx.event.ActionEvent event)Main menu item: Loads the login screen(package private) voidonClickOverview(javafx.event.ActionEvent event)Main menu item: Loads the Overview screen(package private) voidonClickReports(javafx.event.ActionEvent event)Main menu item: Loads the report screen(package private) voidonClickSave(javafx.event.ActionEvent event)Validates entry and saves record as appropriate when the SAVE button is clicked.static voidsetPassedParameters(Customer passed)Function to copy the customer information over to the Modify Screen
-
-
-
Field Detail
-
stage
javafx.stage.Stage stage
-
scene
javafx.scene.Parent scene
-
passedParameters
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
-
textfieldAddress
private javafx.scene.control.TextField textfieldAddress
-
textfieldPostalCode
private javafx.scene.control.TextField textfieldPostalCode
-
textFieldPhoneNumber
private javafx.scene.control.TextField textFieldPhoneNumber
-
comboCountry
private javafx.scene.control.ComboBox<Country> comboCountry
-
comboDivisionID
private javafx.scene.control.ComboBox<Division> comboDivisionID
-
labelCustomerID
private javafx.scene.control.Label labelCustomerID
-
textFieldName
private javafx.scene.control.TextField textFieldName
-
buttonCancel
private javafx.scene.control.Button buttonCancel
-
buttonSave
private javafx.scene.control.Button buttonSave
-
-
Method Detail
-
setPassedParameters
public static void setPassedParameters(Customer passed)
Function to copy the customer information over to the Modify Screen- Parameters:
passed- is a customer object.
-
onClickAddNewCustomer
void onClickAddNewCustomer(javafx.event.ActionEvent event) throws java.io.IOExceptionClicking on Add new customers loads the Add Customer screen- Parameters:
event- button click- Throws:
java.io.IOException
-
onClickCancel
void onClickCancel(javafx.event.ActionEvent event) throws java.io.IOExceptionClicking cancel returns the user to the Customers Overview page.- Parameters:
event- button click- Throws:
java.io.IOException
-
onClickSave
void onClickSave(javafx.event.ActionEvent event) throws java.io.IOExceptionValidates entry and saves record as appropriate when the SAVE button is clicked.- Parameters:
event-- Throws:
java.io.IOException
-
onClickAppointments
void onClickAppointments(javafx.event.ActionEvent event) throws java.io.IOExceptionMain menu item: Loads the appointments screen- Parameters:
event- button click- Throws:
java.io.IOException
-
onClickCustomers
void onClickCustomers(javafx.event.ActionEvent event) throws java.io.IOExceptionMain menu item: Loads the Customers screen- Parameters:
event- button click- Throws:
java.io.IOException
-
onClickLogOut
void onClickLogOut(javafx.event.ActionEvent event) throws java.io.IOExceptionMain menu item: Loads the login screen- Parameters:
event- button click- Throws:
java.io.IOException
-
onClickOverview
void onClickOverview(javafx.event.ActionEvent event) throws java.io.IOExceptionMain menu item: Loads the Overview screen- Parameters:
event- button click- Throws:
java.io.IOException
-
onClickReports
void onClickReports(javafx.event.ActionEvent event) throws java.io.IOExceptionMain menu item: Loads the report screen- Parameters:
event- button click- Throws:
java.io.IOException
-
onClickComboCountry
void onClickComboCountry(javafx.event.ActionEvent event)
Once a country is picked, the application with load the applicable division id's that exist within that country.- Parameters:
event- combo box click
-
initialize
public void initialize(java.net.URL url, java.util.ResourceBundle resourceBundle)Initializes the Customers Modify Controller. Lamda: Listener for changes to the Country Combo box. If it is modified, the correct list of divisions are listed, and the value of the division is set to null, so that the incorrect division is not inadvertantly saved to a country to which it does not belong. Justification: This is a key control function that disallows invalid input- Specified by:
initializein interfacejavafx.fxml.Initializable- Parameters:
url-resourceBundle-
-
-