Class FoundDoctorFullController

java.lang.Object
com.ehealthsystem.appointment.ScheduleLoader
com.ehealthsystem.doctor.FoundDoctorFullController

public class FoundDoctorFullController extends ScheduleLoader
Class for managing the full view of a selected doctor
  • Field Details

    • doctorLabel

      javafx.scene.control.Label doctorLabel
      all 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

      private DoctorDistance doctor
    • userGeoData

      private String userGeoData
    • doctorGeoData

      private String doctorGeoData
  • Constructor Details

    • FoundDoctorFullController

      public FoundDoctorFullController()
  • Method Details

    • start

      public void start() throws IOException, InterruptedException, com.google.maps.errors.ApiException, SQLException
      sets reminder times, loads the map, doctor data and the doctors schedule
      Throws:
      IOException
      InterruptedException
      com.google.maps.errors.ApiException
      SQLException
    • setDoctor

      public void setDoctor(DoctorDistance doctor)
      set the doctor selected in the scene before
      Parameters:
      doctor -
    • setUserGeoData

      public void setUserGeoData(String userGeoData)
      set the user's geodata for map
      Parameters:
      userGeoData -
    • setDoctorGeoData

      public void setDoctorGeoData(String doctorGeoData)
      set the doctor geodata for map
      Parameters:
      doctorGeoData -
    • loadOsmMap

      private void loadOsmMap() throws IOException, InterruptedException, com.google.maps.errors.ApiException
      Deprecated.
      : 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 1
      l2 - coordinates 2
      Returns:
    • loadDoctorData

      private void loadDoctorData() throws SQLException, IOException, InterruptedException, com.google.maps.errors.ApiException
      load the doctor data into the Labels
      Throws:
      SQLException
      IOException
      InterruptedException
      com.google.maps.errors.ApiException
    • loadSchedule

      private boolean loadSchedule() throws SQLException, javax.activation.UnsupportedDataTypeException
      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 class ScheduleLoader
    • handleBackButton

      public void handleBackButton(javafx.event.ActionEvent event) throws IOException
      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.ApiException
      loads 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