Package com.ehealthsystem.appointment
Class AppointmentUserController
java.lang.Object
com.ehealthsystem.appointment.AppointmentUserController
- All Implemented Interfaces:
javafx.fxml.Initializable
Method for loading the user information for the appointment creation
-
Field Summary
Modifier and TypeFieldDescription(package private) javafx.scene.control.Label
(package private) javafx.scene.control.Button
(package private) javafx.scene.control.Label
(package private) javafx.scene.control.Label
(package private) javafx.scene.control.Label
(package private) javafx.scene.control.Label
(package private) javafx.scene.control.Label
(package private) javafx.scene.control.Label
(package private) javafx.scene.control.Label
(package private) javafx.scene.control.ProgressBar
(package private) javafx.scene.control.Label
(package private) javafx.scene.control.Label
attributes with a fx:id assigned in the view(package private) javafx.scene.control.Label
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleCancelButton
(javafx.event.ActionEvent event) Switch scene to primaryvoid
handleContinueButton
(javafx.event.ActionEvent event) Switch scene to next appointment viewvoid
initialize
(URL url, ResourceBundle resourceBundle) First method called when scene is switched.private void
loadBirthday
(LocalDate birthday) Set Date Picker to birthday in DBprivate void
Set Email Text Field to user information in DBprivate void
loadFirstName
(String firstName) Set First Name Text Field to user information in DBprivate void
loadGender
(String gender) Set Gender Text Field to user information in DBprivate void
loadHouseNo
(String houseNo) Set House Number Text Field to user information in DBprivate void
loadInsuranceName
(String insuranceName) Set the Insurance Name Text Field to user information in the DBprivate void
loadLastName
(String lastName) Set Last Name Text Field to user information in DBprivate void
loadPrivateInsurance
(boolean privateInsurance) Set private insurance Check Box to user information in DBprivate void
loadStreet
(String street) Set Street Text Field to user information in DBvoid
Load user information when button is pressedprivate void
loadUsername
(String username) Set Username Text Field to user information in DBprivate void
Set Zip Text Field to user information in DB
-
Field Details
-
usernameLabel
javafx.scene.control.Label usernameLabelattributes with a fx:id assigned in the view -
emailLabel
javafx.scene.control.Label emailLabel -
firstNameLabel
javafx.scene.control.Label firstNameLabel -
lastNameLabel
javafx.scene.control.Label lastNameLabel -
streetLabel
javafx.scene.control.Label streetLabel -
houseNumberLabel
javafx.scene.control.Label houseNumberLabel -
zipCodeLabel
javafx.scene.control.Label zipCodeLabel -
birthdayLabel
javafx.scene.control.Label birthdayLabel -
genderLabel
javafx.scene.control.Label genderLabel -
insuranceNameLabel
javafx.scene.control.Label insuranceNameLabel -
privateInsuranceLabel
javafx.scene.control.Label privateInsuranceLabel -
cancelButton
javafx.scene.control.Button cancelButton -
progressBar
javafx.scene.control.ProgressBar progressBar
-
-
Constructor Details
-
AppointmentUserController
public AppointmentUserController()
-
-
Method Details
-
initialize
First method called when scene is switched. Used to load the user information- Specified by:
initialize
in interfacejavafx.fxml.Initializable
- Parameters:
url
-resourceBundle
-
-
handleCancelButton
Switch scene to primary- Parameters:
event
- event triggered when cancel button is pressed- Throws:
IOException
- if the FXMLLoader can't find .fxml file
-
handleContinueButton
Switch scene to next appointment view- Parameters:
event
-- Throws:
IOException
-
loadUserDetails
public void loadUserDetails()Load user information when button is pressed -
loadUsername
Set Username Text Field to user information in DB- Parameters:
username
- the username of the user logged in
-
loadEmail
Set Email Text Field to user information in DB- Parameters:
email
- the email of the user logged in
-
loadFirstName
Set First Name Text Field to user information in DB- Parameters:
firstName
- the first name of the user logged in
-
loadLastName
Set Last Name Text Field to user information in DB- Parameters:
lastName
- the last name of the user logged in
-
loadStreet
Set Street Text Field to user information in DB- Parameters:
street
- the street of the user logged in
-
loadHouseNo
Set House Number Text Field to user information in DB- Parameters:
houseNo
- the house no of the user logged in
-
loadZip
Set Zip Text Field to user information in DB- Parameters:
zip
- the zip code of the user logged in
-
loadBirthday
Set Date Picker to birthday in DB- Parameters:
birthday
- the birthday of the user logged in
-
loadGender
Set Gender Text Field to user information in DB- Parameters:
gender
- the gender of the user logged in
-
loadInsuranceName
Set the Insurance Name Text Field to user information in the DB- Parameters:
insuranceName
- the insurance name of the user logged in
-
loadPrivateInsurance
private void loadPrivateInsurance(boolean privateInsurance) Set private insurance Check Box to user information in DB- Parameters:
privateInsurance
- the insurance type of the user logged in
-