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.Initializable
UI for the Appointment Overview controller
-
-
Field Summary
Fields Modifier and Type Field Description private javafx.scene.control.Button
buttonAddNewAppointment
private javafx.scene.control.Button
buttonAppointments
private javafx.scene.control.Button
buttonCustomers
private javafx.scene.control.Button
buttonDetail
private javafx.scene.control.Button
buttonLogout
private javafx.scene.control.Button
buttonOverview
private javafx.scene.control.Button
buttonReports
private javafx.scene.control.Button
buttonSearch
private javafx.scene.control.TableColumn<Appointment,java.lang.Integer>
labelAppointmentID
private javafx.scene.control.Label
labelAppointmentMessage
private javafx.scene.control.TableColumn<Appointment,java.lang.Integer>
labelCustomerID
private javafx.scene.control.TableColumn<Appointment,java.lang.String>
labelDescription
private javafx.scene.control.TableColumn<Appointment,java.time.ZonedDateTime>
labelEndTime
private javafx.scene.control.TableColumn<Appointment,java.lang.String>
labelLocation
private javafx.scene.control.TableColumn<Appointment,java.lang.String>
labelName
private javafx.scene.control.TableColumn<Appointment,java.time.ZonedDateTime>
labelStartTime
private javafx.scene.control.TableColumn<Appointment,java.lang.String>
labelTitle
private javafx.scene.control.TableColumn<Appointment,java.lang.String>
labelType
private javafx.scene.control.TableColumn<Appointment,java.lang.Integer>
labelUserID
private javafx.scene.control.RadioButton
radioAll
private javafx.scene.control.RadioButton
radioMonthly
private javafx.scene.control.RadioButton
radioWeekly
(package private) javafx.scene.Parent
scene
(package private) javafx.stage.Stage
stage
private javafx.scene.control.TableView<Appointment>
tableAllAppointments
private javafx.scene.control.TextField
textfieldSearch
private javafx.scene.control.ToggleGroup
View_by
-
Constructor Summary
Constructors Constructor Description AppointmentsOverviewController()
-
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 Appointments Overview 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
onClickButtonAdd(javafx.event.ActionEvent event)
Loads the Add appointments screen when the ADD APPOINTMENT button is clicked(package private) void
onClickButtonDetail(javafx.event.ActionEvent event)
Handler for the VIEW APPOINTMENT DETAILS button.(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
onClickRadioAll(javafx.event.ActionEvent event)
Loads all records when the ALL radio button is clicked(package private) void
onClickRadioMonth(javafx.event.ActionEvent event)
Loads a month view of appointments when the MONTHLY radio button is clicked.(package private) void
onClickRadioWeek(javafx.event.ActionEvent event)
Loads a week view of appointments when the WEEKLY radio button is clicked(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.
-
-
-
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.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
-
onClickButtonDetail
void onClickButtonDetail(javafx.event.ActionEvent event) throws java.io.IOException, java.lang.reflect.InvocationTargetException
Handler 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.IOException
java.lang.reflect.InvocationTargetException
-
onClickButtonAdd
void onClickButtonAdd(javafx.event.ActionEvent event) throws java.io.IOException
Loads 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:
initialize
in interfacejavafx.fxml.Initializable
- Parameters:
url
-resourceBundle
-
-
-