Package scheduler.controller
Class CustomersAddController
- java.lang.Object
-
- scheduler.controller.CustomersAddController
-
- All Implemented Interfaces:
javafx.fxml.Initializable
public class CustomersAddController extends java.lang.Object implements javafx.fxml.Initializable
Controller for the Add 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) 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 CustomersAddController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initialize(java.net.URL url, java.util.ResourceBundle resourceBundle)
Initializes the Customers Add Controller(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
onClickCancel(javafx.event.ActionEvent event)
Loads the Customers Overview page when the CANCEL button is clicked.(package private) void
onClickCountryCombo(javafx.event.ActionEvent event)
Once a country is picked, the division combo box will be populated with relevant divisions.(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
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
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
onClickSave(javafx.event.ActionEvent event)
Event handler for when the SAVE button is clicked.
-
-
-
Field Detail
-
stage
javafx.stage.Stage stage
-
scene
javafx.scene.Parent scene
-
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
-
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
-
onClickCountryCombo
void onClickCountryCombo(javafx.event.ActionEvent event)
Once a country is picked, the division combo box will be populated with relevant divisions.- Parameters:
event
- combo box click
-
onClickSave
void onClickSave(javafx.event.ActionEvent event) throws java.io.IOException
Event handler for when the SAVE button is clicked. Displays errors that occur during validation and requests confirmation as appropriate.- Parameters:
event
-- Throws:
java.io.IOException
-
onClickCancel
void onClickCancel(javafx.event.ActionEvent event) throws java.io.IOException
Loads the Customers Overview page when the CANCEL button is clicked.- Parameters:
event
-- Throws:
java.io.IOException
-
initialize
public void initialize(java.net.URL url, java.util.ResourceBundle resourceBundle)
Initializes the Customers Add Controller- Specified by:
initialize
in interfacejavafx.fxml.Initializable
- Parameters:
url
-resourceBundle
-
-
-