Package com.ehealthsystem.appointment
Class AppointmentInformationController
java.lang.Object
com.ehealthsystem.appointment.AppointmentInformationController
- All Implemented Interfaces:
javafx.fxml.Initializable
Class which manages the appointment data
-
Field Summary
Modifier and TypeFieldDescription(package private) javafx.scene.control.Label
(package private) javafx.scene.control.ComboBox
(package private) javafx.scene.control.TextField
(package private) javafx.scene.control.Slider
attributes with a fix:id in the view -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleBackButton
(javafx.event.ActionEvent event) switch to the last scene if the button is pressed.void
handleContinueButton
(javafx.event.ActionEvent event) handle the event that is triggered when pressing the continue button.void
initialize
(URL url, ResourceBundle resourceBundle) First method that is called when switching the scene.private boolean
saveData()
Save the appointment databoolean
triggers error method if field is left empty.boolean
Check if the user provided a health problem as a reason for making an appointment
-
Field Details
-
searchDistanceSlider
javafx.scene.control.Slider searchDistanceSliderattributes with a fix:id in the view -
healthProblemField
javafx.scene.control.TextField healthProblemField -
healthProblemChoiceBox
javafx.scene.control.ComboBox healthProblemChoiceBox -
errorLabel
javafx.scene.control.Label errorLabel
-
-
Constructor Details
-
AppointmentInformationController
public AppointmentInformationController()
-
-
Method Details
-
initialize
First method that is called when switching the scene. Used to set the default values of the all the scene components.- Specified by:
initialize
in interfacejavafx.fxml.Initializable
- Parameters:
url
-resourceBundle
-
-
handleContinueButton
public void handleContinueButton(javafx.event.ActionEvent event) throws IOException, InterruptedException, com.google.maps.errors.ApiException, SQLException handle the event that is triggered when pressing the continue button. Save the selected appointment information and determine if something is left empty.- Parameters:
event
- the event that triggered the method- Throws:
IOException
InterruptedException
com.google.maps.errors.ApiException
SQLException
-
saveData
Save the appointment data- Returns:
- Throws:
SQLException
-
handleBackButton
switch to the last scene if the button is pressed.- Parameters:
event
- the event that triggered the method- Throws:
IOException
SQLException
-
validateHealthProblem
public boolean validateHealthProblem()triggers error method if field is left empty.- Returns:
-
validateHealthProblemChoiceBox
public boolean validateHealthProblemChoiceBox()Check if the user provided a health problem as a reason for making an appointment- Returns:
- boolean if the choice of health problem is valid
-