From 864fbd37a8ade80794f5cfd30b3ccb1cdb060a70 Mon Sep 17 00:00:00 2001 From: Dorian Nemec Date: Tue, 21 May 2024 08:39:58 +0200 Subject: [PATCH] #24: Javado& Cleanup --- .../nhplus/main/MainWindowController.java | 20 ++++++++++++++----- .../DeprecatedMedicationController.java | 3 +++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/main/java/de/hitec/nhplus/main/MainWindowController.java b/src/main/java/de/hitec/nhplus/main/MainWindowController.java index 27daa89..8ea4040 100644 --- a/src/main/java/de/hitec/nhplus/main/MainWindowController.java +++ b/src/main/java/de/hitec/nhplus/main/MainWindowController.java @@ -2,6 +2,9 @@ package de.hitec.nhplus.main; import de.hitec.nhplus.Main; import de.hitec.nhplus.nurse.Nurse; +import de.hitec.nhplus.patient.Patient; +import de.hitec.nhplus.treatment.Treatment; +import de.hitec.nhplus.medication.Medication; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.scene.control.SelectionModel; @@ -81,7 +84,7 @@ public class MainWindowController { } /** - * Loads the patient page into its tab. + * Loads the {@link Patient} page into its tab. */ private void loadPatientPage() { try { @@ -99,7 +102,7 @@ public class MainWindowController { } /** - * Loads the {@link } page into its tab. + * Loads the {@link Treatment} page into its tab. */ private void loadTreatmentsPage() { try { @@ -117,7 +120,7 @@ public class MainWindowController { } /** - * Loads the nurse page into its tab. + * Loads the {@link Nurse} page into its tab. */ private void loadNursePage() { SelectionModel selectionModel = nurseTabPane.getSelectionModel(); @@ -166,6 +169,9 @@ public class MainWindowController { } } + /** + * Loads the {@link Medication} page into its tab. + */ private void loadMedicationPage() { SelectionModel selectionModel = medicationTabPane.getSelectionModel(); @@ -179,7 +185,7 @@ public class MainWindowController { } /** - * Loads the medication page into its tab. + * Loads the {@link Medication} page into its tab. */ private void loadAvailableMedicationPage() { try { @@ -196,10 +202,14 @@ public class MainWindowController { } } + /** + * Loads the deprecated {@link Medication} page into its tab. + */ private void loadDeprecatedMedicationPage(){ try { BorderPane deprecatedMedicationPane = FXMLLoader.load( - Objects.requireNonNull(Main.class.getResource("/de/hitec/nhplus/medication/DeprecatedMedicationView.fxml")) + Objects.requireNonNull(Main.class.getResource( + "/de/hitec/nhplus/medication/DeprecatedMedicationView.fxml")) ); deprecatedMedicationPage.getChildren().setAll(deprecatedMedicationPane); AnchorPane.setTopAnchor(deprecatedMedicationPane, 0d); diff --git a/src/main/java/de/hitec/nhplus/medication/DeprecatedMedicationController.java b/src/main/java/de/hitec/nhplus/medication/DeprecatedMedicationController.java index 8d36f59..7f0bb51 100644 --- a/src/main/java/de/hitec/nhplus/medication/DeprecatedMedicationController.java +++ b/src/main/java/de/hitec/nhplus/medication/DeprecatedMedicationController.java @@ -38,6 +38,9 @@ public class DeprecatedMedicationController { private final ObservableList medications = FXCollections.observableArrayList(); private MedicationDao dao; + /** + * Initialization method that is called after the binding of all the fields. + */ public void initialize() { this.readAllAndShowInTableView();