Package scheduler.controller
Class AppointmentsOverviewController
- java.lang.Object
-
- scheduler.controller.AppointmentsOverviewController
-
- All Implemented Interfaces:
javafx.fxml.Initializable
public class AppointmentsOverviewController extends java.lang.Object implements javafx.fxml.InitializableUI for the Appointment Overview controller
-
-
Field Summary
Fields Modifier and Type Field Description private javafx.scene.control.ButtonbuttonAddNewAppointmentprivate javafx.scene.control.ButtonbuttonAppointmentsprivate javafx.scene.control.ButtonbuttonCustomersprivate javafx.scene.control.ButtonbuttonDetailprivate javafx.scene.control.ButtonbuttonLogoutprivate javafx.scene.control.ButtonbuttonOverviewprivate javafx.scene.control.ButtonbuttonReportsprivate javafx.scene.control.ButtonbuttonSearchprivate javafx.scene.control.TableColumn<Appointment,java.lang.Integer>labelAppointmentIDprivate javafx.scene.control.LabellabelAppointmentMessageprivate javafx.scene.control.TableColumn<Appointment,java.lang.Integer>labelCustomerIDprivate javafx.scene.control.TableColumn<Appointment,java.lang.String>labelDescriptionprivate javafx.scene.control.TableColumn<Appointment,java.time.ZonedDateTime>labelEndTimeprivate javafx.scene.control.TableColumn<Appointment,java.lang.String>labelLocationprivate javafx.scene.control.TableColumn<Appointment,java.lang.String>labelNameprivate javafx.scene.control.TableColumn<Appointment,java.time.ZonedDateTime>labelStartTimeprivate javafx.scene.control.TableColumn<Appointment,java.lang.String>labelTitleprivate javafx.scene.control.TableColumn<Appointment,java.lang.String>labelTypeprivate javafx.scene.control.TableColumn<Appointment,java.lang.Integer>labelUserIDprivate javafx.scene.control.RadioButtonradioAllprivate javafx.scene.control.RadioButtonradioMonthlyprivate javafx.scene.control.RadioButtonradioWeekly(package private) javafx.scene.Parentscene(package private) javafx.stage.Stagestageprivate javafx.scene.control.TableView<Appointment>tableAllAppointmentsprivate javafx.scene.control.TextFieldtextfieldSearchprivate javafx.scene.control.ToggleGroupView_by
-
Constructor Summary
Constructors Constructor Description AppointmentsOverviewController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(java.net.URL url, java.util.ResourceBundle resourceBundle)Initializes the Appointments Overview Controller.(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) voidonClickButtonAdd(javafx.event.ActionEvent event)Loads the Add appointments screen when the ADD APPOINTMENT button is clicked(package private) voidonClickButtonDetail(javafx.event.ActionEvent event)Handler for the VIEW APPOINTMENT DETAILS button.(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) 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) 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) voidonClickRadioAll(javafx.event.ActionEvent event)Loads all records when the ALL radio button is clicked(package private) voidonClickRadioMonth(javafx.event.ActionEvent event)Loads a month view of appointments when the MONTHLY radio button is clicked.(package private) voidonClickRadioWeek(javafx.event.ActionEvent event)Loads a week view of appointments when the WEEKLY radio button is clicked(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.
-
-
-
Field Detail
-
stage
javafx.stage.Stage stage
-
scene
javafx.scene.Parent scene
-
buttonAddNewAppointment
private javafx.scene.control.Button buttonAddNewAppointment
-
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
-
buttonDetail
private javafx.scene.control.Button buttonDetail
-
textfieldSearch
private javafx.scene.control.TextField textfieldSearch
-
buttonSearch
private javafx.scene.control.Button buttonSearch
-
radioAll
private javafx.scene.control.RadioButton radioAll
-
View_by
private javafx.scene.control.ToggleGroup View_by
-
radioWeekly
private javafx.scene.control.RadioButton radioWeekly
-
radioMonthly
private javafx.scene.control.RadioButton radioMonthly
-
tableAllAppointments
private javafx.scene.control.TableView<Appointment> tableAllAppointments
-
labelAppointmentID
private javafx.scene.control.TableColumn<Appointment,java.lang.Integer> labelAppointmentID
-
labelName
private javafx.scene.control.TableColumn<Appointment,java.lang.String> labelName
-
labelType
private javafx.scene.control.TableColumn<Appointment,java.lang.String> labelType
-
labelTitle
private javafx.scene.control.TableColumn<Appointment,java.lang.String> labelTitle
-
labelDescription
private javafx.scene.control.TableColumn<Appointment,java.lang.String> labelDescription
-
labelLocation
private javafx.scene.control.TableColumn<Appointment,java.lang.String> labelLocation
-
labelStartTime
private javafx.scene.control.TableColumn<Appointment,java.time.ZonedDateTime> labelStartTime
-
labelEndTime
private javafx.scene.control.TableColumn<Appointment,java.time.ZonedDateTime> labelEndTime
-
labelCustomerID
private javafx.scene.control.TableColumn<Appointment,java.lang.Integer> labelCustomerID
-
labelUserID
private javafx.scene.control.TableColumn<Appointment,java.lang.Integer> labelUserID
-
labelAppointmentMessage
private javafx.scene.control.Label labelAppointmentMessage
-
-
Method Detail
-
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
-
onClickButtonDetail
void onClickButtonDetail(javafx.event.ActionEvent event) throws java.io.IOException, java.lang.reflect.InvocationTargetExceptionHandler for the VIEW APPOINTMENT DETAILS button. Posts a dialogue to the user if an appointment is not selected. Else, loads the appropriate details page.- Parameters:
event-- Throws:
java.io.IOExceptionjava.lang.reflect.InvocationTargetException
-
onClickButtonAdd
void onClickButtonAdd(javafx.event.ActionEvent event) throws java.io.IOExceptionLoads the Add appointments screen when the ADD APPOINTMENT button is clicked- Parameters:
event-- Throws:
java.io.IOException
-
onClickRadioAll
void onClickRadioAll(javafx.event.ActionEvent event)
Loads all records when the ALL radio button is clicked- Parameters:
event-
-
onClickRadioMonth
void onClickRadioMonth(javafx.event.ActionEvent event)
Loads a month view of appointments when the MONTHLY radio button is clicked.- Parameters:
event-
-
onClickRadioWeek
void onClickRadioWeek(javafx.event.ActionEvent event)
Loads a week view of appointments when the WEEKLY radio button is clicked- Parameters:
event-
-
initialize
public void initialize(java.net.URL url, java.util.ResourceBundle resourceBundle)Initializes the Appointments Overview Controller. Contains a Lambda expression that is a Listener for when a value on the Table View is clicked. When a value is clicked a label at the top of the page changes to the reflect the Appointment ID. It also sets up passed parameters for the Appointment object, which can be used to populate that customer's information on the detail screen. Justification: This is used to make it clear to the user which record they are opening before they click the associated button.- Specified by:
initializein interfacejavafx.fxml.Initializable- Parameters:
url-resourceBundle-
-
-