Package com.ehealthsystem.tools
Class SceneSwitch
java.lang.Object
com.ehealthsystem.tools.SceneSwitch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcenterWindow(javafx.stage.Stage stage) Center the windowstatic voidloadAppointmentMadeView(javafx.event.Event event, Appointment appointment) Switches scene and displays the appointment the user has made.static voidSwitch to another scenestatic voidswitchToCentered(javafx.event.Event event, String file, String title) Switch to another scene and centering the window
-
Constructor Details
-
SceneSwitch
public SceneSwitch()
-
-
Method Details
-
switchTo
Switch to another scene- Parameters:
event- the JavaFX event from the controller's handler method for the trigger (e.g. button)file- the FXML file for the next scenetitle- the window title to display- Throws:
IOException- if the file was not found
-
switchToCentered
public static void switchToCentered(javafx.event.Event event, String file, String title) throws IOException Switch to another scene and centering the window- Parameters:
event- the JavaFX event from the controller's handler method for the trigger (e.g. button)file- the FXML file for the next scenetitle- the window title to display- Throws:
IOException- if the file was not found
-
centerWindow
public static void centerWindow(javafx.stage.Stage stage) Center the window- Parameters:
stage- the JavaFX window to center
-
loadAppointmentMadeView
public static void loadAppointmentMadeView(javafx.event.Event event, Appointment appointment) throws IOException, SQLException, InterruptedException, com.google.maps.errors.ApiException Switches scene and displays the appointment the user has made.- Parameters:
event- Trigger to invoke this method.appointment- The appointment made by the user.- Throws:
IOExceptionSQLExceptionInterruptedExceptioncom.google.maps.errors.ApiException
-