Package scheduler.controller
Class AppointmentsAddController
- java.lang.Object
-
- scheduler.controller.AppointmentsAddController
-
- All Implemented Interfaces:
javafx.fxml.Initializable
public class AppointmentsAddController extends java.lang.Object implements javafx.fxml.Initializable
Class to Manage the UI of the "Appointments : Add" screen
-
-
Field Summary
Fields Modifier and Type Field Description 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<Contact>
comboBoxContact
private javafx.scene.control.ComboBox<Customer>
comboBoxCustomer
private javafx.scene.control.ComboBox<java.lang.String>
comboBoxType
private javafx.scene.control.ComboBox<java.time.LocalTime>
comboEndTime
private javafx.scene.control.ComboBox<java.time.LocalTime>
comboStartTime
private javafx.scene.control.ComboBox<java.lang.String>
comboType
private javafx.scene.control.DatePicker
dateDatePicker
private javafx.scene.control.Label
labelAppointmentID
private javafx.scene.control.Label
labelCustomerID
private javafx.scene.control.Label
labelUserID
(package private) javafx.scene.Parent
scene
(package private) javafx.stage.Stage
stage
private javafx.scene.control.TextField
textDescription
private javafx.scene.control.TextField
textFieldLocation
private javafx.scene.control.TextField
textFieldName
private javafx.scene.control.TextField
textfieldSearch
private javafx.scene.control.TextField
textfieldTitle
-
Constructor Summary
Constructors Constructor Description AppointmentsAddController()
-
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 Appts 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 Appointment overview screen when the user cancels(package private) void
onClickComboBoxContact(javafx.event.ActionEvent event)
(package private) void
onClickComboBoxCustomer(javafx.event.ActionEvent event)
Sets the label value for customer id when the user selects or updates the Customer name from the dropdown box.(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)
Controls what happens when the "save" button is clicked.
-
-
-
Field Detail
-
stage
javafx.stage.Stage stage
-
scene
javafx.scene.Parent scene
-
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
-
textfieldTitle
private javafx.scene.control.TextField textfieldTitle
-
textDescription
private javafx.scene.control.TextField textDescription
-
labelAppointmentID
private javafx.scene.control.Label labelAppointmentID
-
textFieldName
private javafx.scene.control.TextField textFieldName
-
comboType
private javafx.scene.control.ComboBox<java.lang.String> comboType
-
textFieldLocation
private javafx.scene.control.TextField textFieldLocation
-
dateDatePicker
private javafx.scene.control.DatePicker dateDatePicker
-
comboStartTime
private javafx.scene.control.ComboBox<java.time.LocalTime> comboStartTime
-
comboEndTime
private javafx.scene.control.ComboBox<java.time.LocalTime> comboEndTime
-
labelCustomerID
private javafx.scene.control.Label labelCustomerID
-
labelUserID
private javafx.scene.control.Label labelUserID
-
buttonCancel
private javafx.scene.control.Button buttonCancel
-
buttonSave
private javafx.scene.control.Button buttonSave
-
comboBoxContact
private javafx.scene.control.ComboBox<Contact> comboBoxContact
-
comboBoxCustomer
private javafx.scene.control.ComboBox<Customer> comboBoxCustomer
-
comboBoxType
private javafx.scene.control.ComboBox<java.lang.String> comboBoxType
-
-
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
- button click- 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
- button click- 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
- button click- 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
- button click- 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
- button click- Throws:
java.io.IOException
-
onClickSave
void onClickSave(javafx.event.ActionEvent event) throws java.io.IOException
Controls what happens when the "save" button is clicked. Values are used to create an object of Appointment type. Validation is run, and if the input validates then the record is saved.- Parameters:
event
- "Save" button is clicked.- Throws:
java.io.IOException
-
onClickCancel
void onClickCancel(javafx.event.ActionEvent event) throws java.io.IOException
Loads the Appointment overview screen when the user cancels- Parameters:
event
- button click- Throws:
java.io.IOException
-
onClickComboBoxCustomer
void onClickComboBoxCustomer(javafx.event.ActionEvent event)
Sets the label value for customer id when the user selects or updates the Customer name from the dropdown box.- Parameters:
event
- combo box click
-
onClickComboBoxContact
void onClickComboBoxContact(javafx.event.ActionEvent event)
-
initialize
public void initialize(java.net.URL url, java.util.ResourceBundle resourceBundle)
Initializes the Appts Add Controller- Specified by:
initialize
in interfacejavafx.fxml.Initializable
- Parameters:
url
-resourceBundle
-
-
-