#24: Javado & Cleanup
All checks were successful
Quality Check / Linting Check (push) Successful in 17s
Quality Check / Linting Check (pull_request) Successful in 21s
Quality Check / Javadoc Check (push) Successful in 38s
Quality Check / Javadoc Check (pull_request) Successful in 36s

This commit is contained in:
Dorian Nemec 2024-05-21 08:39:58 +02:00 committed by Dominik Säume
parent 812bc30bf2
commit cc5af63b0e
Signed by: SZUT-Dominik
GPG key ID: 67D15BB250B41E7C
2 changed files with 18 additions and 5 deletions

View file

@ -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<Tab> selectionModel = nurseTabPane.getSelectionModel();
@ -166,6 +169,9 @@ public class MainWindowController {
}
}
/**
* Loads the {@link Medication} page into its tab.
*/
private void loadMedicationPage()
{
SelectionModel<Tab> 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);

View file

@ -38,6 +38,9 @@ public class DeprecatedMedicationController {
private final ObservableList<Medication> medications = FXCollections.observableArrayList();
private MedicationDao dao;
/**
* Initialization method that is called after the binding of all the fields.
*/
public void initialize() {
this.readAllAndShowInTableView();