Package com.ehealthsystem.doctor
Class FoundDoctorFullController
java.lang.Object
com.ehealthsystem.appointment.ScheduleLoader
com.ehealthsystem.doctor.FoundDoctorFullController
Class for managing the full view of a selected doctor
-
Field Summary
Modifier and TypeFieldDescription(package private) javafx.scene.control.Label
(package private) javafx.scene.control.Label
(package private) javafx.scene.control.DatePicker
private DoctorDistance
private String
(package private) javafx.scene.control.Label
all attributes with a fx:id assigned in the view(package private) javafx.scene.control.Button
private javafx.scene.web.WebView
(package private) javafx.scene.control.ComboBox
(package private) javafx.scene.control.Label
private String
Fields inherited from class com.ehealthsystem.appointment.ScheduleLoader
errorLabel, NO_TIME_SELECTED, selectedTime
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate com.google.maps.model.LatLng[]
getBoundsForImage
(com.google.maps.model.LatLng l1, com.google.maps.model.LatLng l2) Algorithm to determine bounds to display a map image with two locations as markers Adds spacing so that the map markers are not directly at the edge but within the displayed area/frame Adds spacing on top of the map because marker is represented by a bubble above the actual locationvoid
handleBackButton
(javafx.event.ActionEvent event) method to load to previous scenevoid
handleDateChoice
(javafx.event.ActionEvent event) check if a valid date is pickedvoid
handleMakeAppointmentButton
(javafx.event.ActionEvent event) method to handle the event when trying to make an appointmentprivate void
load the doctor data into the Labelsvoid
loadGMap()
loads the map into the scene via webengine and webviewprivate void
Deprecated.private boolean
dynamically load the doctors scheduleprotected void
Handler that triggers whenever the user selected another time.void
setDoctor
(DoctorDistance doctor) set the doctor selected in the scene beforevoid
setDoctorGeoData
(String doctorGeoData) set the doctor geodata for mapvoid
setUserGeoData
(String userGeoData) set the user's geodata for mapvoid
start()
sets reminder times, loads the map, doctor data and the doctors scheduleMethods inherited from class com.ehealthsystem.appointment.ScheduleLoader
loadSchedule
-
Field Details
-
doctorLabel
javafx.scene.control.Label doctorLabelall attributes with a fx:id assigned in the view -
addressLabel
javafx.scene.control.Label addressLabel -
specializationsLabel
javafx.scene.control.Label specializationsLabel -
dateLabel
javafx.scene.control.Label dateLabel -
datePicker
javafx.scene.control.DatePicker datePicker -
reminderComboBox
javafx.scene.control.ComboBox reminderComboBox -
makeAppointmentButton
javafx.scene.control.Button makeAppointmentButton -
mapWebView
private javafx.scene.web.WebView mapWebView -
doctor
-
userGeoData
-
doctorGeoData
-
-
Constructor Details
-
FoundDoctorFullController
public FoundDoctorFullController()
-
-
Method Details
-
start
public void start() throws IOException, InterruptedException, com.google.maps.errors.ApiException, SQLExceptionsets reminder times, loads the map, doctor data and the doctors schedule- Throws:
IOException
InterruptedException
com.google.maps.errors.ApiException
SQLException
-
setDoctor
set the doctor selected in the scene before- Parameters:
doctor
-
-
setUserGeoData
set the user's geodata for map- Parameters:
userGeoData
-
-
setDoctorGeoData
set the doctor geodata for map- Parameters:
doctorGeoData
-
-
loadOsmMap
private void loadOsmMap() throws IOException, InterruptedException, com.google.maps.errors.ApiExceptionDeprecated.: replaced by interactive route display:loadGMap()
Load a static map image using OpenStreetMap data into the webview- Throws:
IOException
InterruptedException
com.google.maps.errors.ApiException
-
getBoundsForImage
private com.google.maps.model.LatLng[] getBoundsForImage(com.google.maps.model.LatLng l1, com.google.maps.model.LatLng l2) Algorithm to determine bounds to display a map image with two locations as markers Adds spacing so that the map markers are not directly at the edge but within the displayed area/frame Adds spacing on top of the map because marker is represented by a bubble above the actual location- Parameters:
l1
- coordinates 1l2
- coordinates 2- Returns:
-
loadDoctorData
private void loadDoctorData() throws SQLException, IOException, InterruptedException, com.google.maps.errors.ApiExceptionload the doctor data into the Labels- Throws:
SQLException
IOException
InterruptedException
com.google.maps.errors.ApiException
-
loadSchedule
dynamically load the doctors schedule- Throws:
SQLException
javax.activation.UnsupportedDataTypeException
-
selectedTimeChanged
protected void selectedTimeChanged()Description copied from class:ScheduleLoader
Handler that triggers whenever the user selected another time. Empty in this abstract class, but can be overwritten in inheriting/extending classes to easily add functionality- Overrides:
selectedTimeChanged
in classScheduleLoader
-
handleBackButton
method to load to previous scene- Parameters:
event
-- Throws:
IOException
-
handleMakeAppointmentButton
public void handleMakeAppointmentButton(javafx.event.ActionEvent event) throws IOException, SQLException, javax.mail.MessagingException, InterruptedException, com.google.maps.errors.ApiException method to handle the event when trying to make an appointment- Parameters:
event
-- Throws:
IOException
SQLException
javax.mail.MessagingException
InterruptedException
com.google.maps.errors.ApiException
-
loadGMap
public void loadGMap() throws IOException, InterruptedException, com.google.maps.errors.ApiExceptionloads the map into the scene via webengine and webview- Throws:
IOException
InterruptedException
com.google.maps.errors.ApiException
-
handleDateChoice
public void handleDateChoice(javafx.event.ActionEvent event) throws SQLException, javax.activation.UnsupportedDataTypeException check if a valid date is picked- Parameters:
event
- event that triggered the method- Throws:
SQLException
javax.activation.UnsupportedDataTypeException
-
loadGMap()
Load a static map image using OpenStreetMap data into the webview