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.Initializable
Controller for the Modify Customer UI
-
-
Field Summary
Fields Modifier and Type Field Description private javafx.scene.control.Button
buttonAddNewCustomer
private javafx.scene.control.Button
buttonAppointments
private javafx.scene.control.Button
buttonCancel
private javafx.scene.control.Button
buttonCustomers
private javafx.scene.control.Button
buttonLogout
private javafx.scene.control.Button
buttonOverview
private javafx.scene.control.Button
buttonReports
private javafx.scene.control.Button
buttonSave
private javafx.scene.control.Button
buttonSearch
private javafx.scene.control.ComboBox<Country>
comboCountry
private javafx.scene.control.ComboBox<Division>
comboDivisionID
private javafx.scene.control.Label
labelCustomerID
(package private) static Customer
passedParameters
(package private) javafx.scene.Parent
scene
(package private) javafx.stage.Stage
stage
private javafx.scene.control.TextField
textfieldAddress
private javafx.scene.control.TextField
textFieldName
private javafx.scene.control.TextField
textFieldPhoneNumber
private javafx.scene.control.TextField
textfieldPostalCode
private javafx.scene.control.TextField
textfieldSearch
-
Constructor Summary
Constructors Constructor Description CustomersModifyController()
-
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 Modify Controller.(package private) void
onClickAddNewCustomer(javafx.event.ActionEvent event)
Clicking on Add new customers loads the Add Customer screen(package private) void
onClickAppointments(javafx.event.ActionEvent event)
Main menu item: Loads the appointments screen(package private) void
onClickCancel(javafx.event.ActionEvent event)
Clicking cancel returns the user to the Customers Overview page.(package private) 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.(package private) void
onClickCustomers(javafx.event.ActionEvent event)
Main menu item: Loads the Customers screen(package private) void
onClickLogOut(javafx.event.ActionEvent event)
Main menu item: Loads the login screen(package private) void
onClickOverview(javafx.event.ActionEvent event)
Main menu item: Loads the Overview screen(package private) void
onClickReports(javafx.event.ActionEvent event)
Main menu item: Loads the report screen(package private) void
onClickSave(javafx.event.ActionEvent event)
Validates entry and saves record as appropriate when the SAVE button is clicked.static void
setPassedParameters(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.IOException
Clicking 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.IOException
Clicking 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.IOException
Validates 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.IOException
Main menu item: Loads the appointments screen- Parameters:
event
- button click- Throws:
java.io.IOException
-
onClickCustomers
void onClickCustomers(javafx.event.ActionEvent event) throws java.io.IOException
Main menu item: Loads the Customers screen- Parameters:
event
- button click- Throws:
java.io.IOException
-
onClickLogOut
void onClickLogOut(javafx.event.ActionEvent event) throws java.io.IOException
Main menu item: Loads the login screen- Parameters:
event
- button click- Throws:
java.io.IOException
-
onClickOverview
void onClickOverview(javafx.event.ActionEvent event) throws java.io.IOException
Main menu item: Loads the Overview screen- Parameters:
event
- button click- Throws:
java.io.IOException
-
onClickReports
void onClickReports(javafx.event.ActionEvent event) throws java.io.IOException
Main 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:
initialize
in interfacejavafx.fxml.Initializable
- Parameters:
url
-resourceBundle
-
-
-