diff --git a/db/nursingHome.db b/db/nursingHome.db
index 49707f4..2388972 100644
Binary files a/db/nursingHome.db and b/db/nursingHome.db differ
diff --git a/src/main/java/de/hitec/nhplus/Main.java b/src/main/java/de/hitec/nhplus/Main.java
index bab1c27..e5fc13d 100644
--- a/src/main/java/de/hitec/nhplus/Main.java
+++ b/src/main/java/de/hitec/nhplus/Main.java
@@ -22,7 +22,7 @@ public class Main extends Application {
public void mainWindow() {
try {
- FXMLLoader loader = new FXMLLoader(Main.class.getResource("/de/hitec/nhplus/MainWindowView.fxml"));
+ FXMLLoader loader = new FXMLLoader(Main.class.getResource("/de/hitec/nhplus/main/MainWindowView.fxml"));
TabPane pane = loader.load();
Scene scene = new Scene(pane);
diff --git a/src/main/java/de/hitec/nhplus/main/MainWindowController.java b/src/main/java/de/hitec/nhplus/main/MainWindowController.java
index d76ea67..36e4faf 100644
--- a/src/main/java/de/hitec/nhplus/main/MainWindowController.java
+++ b/src/main/java/de/hitec/nhplus/main/MainWindowController.java
@@ -4,12 +4,15 @@ import de.hitec.nhplus.Main;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.control.Tab;
+import javafx.scene.control.TabPane;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.BorderPane;
import java.io.IOException;
public class MainWindowController {
+ @FXML
+ private TabPane mainTabPane;
@FXML
private AnchorPane patientPage;
@FXML
@@ -18,14 +21,20 @@ public class MainWindowController {
private AnchorPane treatmentPage;
@FXML
private Tab treatmentTab;
+ @FXML
+ private AnchorPane nursePage;
+ @FXML
+ private Tab nurseTab;
@FXML
public void initialize() {
loadPatientPage();
- loadTreatmentsPage();
+ mainTabPane.getSelectionModel().select(patientTab);
patientTab.setOnSelectionChanged(event -> loadPatientPage());
treatmentTab.setOnSelectionChanged(event -> loadTreatmentsPage());
+ nurseTab.setOnSelectionChanged(event -> loadNursePage());
+
}
private void loadPatientPage() {
@@ -57,4 +66,19 @@ public class MainWindowController {
exception.printStackTrace();
}
}
+
+ private void loadNursePage() {
+ try {
+ BorderPane nursePane = FXMLLoader.load(
+ Main.class.getResource("/de/hitec/nhplus/nurse/AllNurseView.fxml")
+ );
+ nursePage.getChildren().setAll(nursePane);
+ AnchorPane.setTopAnchor(nursePane, 0d);
+ AnchorPane.setBottomAnchor(nursePane, 0d);
+ AnchorPane.setLeftAnchor(nursePane, 0d);
+ AnchorPane.setRightAnchor(nursePane, 0d);
+ } catch (IOException exception) {
+ exception.printStackTrace();
+ }
+ }
}
diff --git a/src/main/resources/de/hitec/nhplus/MainWindowView.fxml b/src/main/resources/de/hitec/nhplus/main/MainWindowView.fxml
similarity index 83%
rename from src/main/resources/de/hitec/nhplus/MainWindowView.fxml
rename to src/main/resources/de/hitec/nhplus/main/MainWindowView.fxml
index 00eab26..7d1697d 100644
--- a/src/main/resources/de/hitec/nhplus/MainWindowView.fxml
+++ b/src/main/resources/de/hitec/nhplus/main/MainWindowView.fxml
@@ -4,6 +4,7 @@
+
+
+
diff --git a/src/main/resources/de/hitec/nhplus/nurse/AllNurseView.fxml b/src/main/resources/de/hitec/nhplus/nurse/AllNurseView.fxml
index c775e66..95e23c9 100644
--- a/src/main/resources/de/hitec/nhplus/nurse/AllNurseView.fxml
+++ b/src/main/resources/de/hitec/nhplus/nurse/AllNurseView.fxml
@@ -4,11 +4,10 @@
-
-
+
@@ -19,8 +18,7 @@
-
+
@@ -29,8 +27,7 @@
-
+
+