Class AppointmentInformationController

java.lang.Object
com.ehealthsystem.appointment.AppointmentInformationController
All Implemented Interfaces:
javafx.fxml.Initializable

public class AppointmentInformationController extends Object implements javafx.fxml.Initializable
Class which manages the appointment data
  • Field Details

    • searchDistanceSlider

      javafx.scene.control.Slider searchDistanceSlider
      attributes 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

      public void initialize(URL url, ResourceBundle resourceBundle)
      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 interface javafx.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

      private boolean saveData() throws SQLException
      Save the appointment data
      Returns:
      Throws:
      SQLException
    • handleBackButton

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