NOTICKET: Connect Nurse Module
Signed-off-by: Dominik Säume <Dominik.Saeume@hmmh.de>
This commit is contained in:
parent
8302543c30
commit
271387e88e
5 changed files with 35 additions and 10 deletions
Binary file not shown.
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<?import javafx.scene.control.TabPane?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<TabPane
|
||||
fx:id="mainTabPane"
|
||||
tabClosingPolicy="UNAVAILABLE"
|
||||
xmlns="http://javafx.com/javafx/17.0.2-ea"
|
||||
xmlns:fx="http://javafx.com/fxml/1"
|
||||
|
@ -15,4 +16,7 @@
|
|||
<Tab fx:id="treatmentTab" text="Behandlungen">
|
||||
<AnchorPane fx:id="treatmentPage"/>
|
||||
</Tab>
|
||||
<Tab fx:id="nurseTab" text="Pfleger">
|
||||
<AnchorPane fx:id="nursePage"/>
|
||||
</Tab>
|
||||
</TabPane>
|
|
@ -4,11 +4,10 @@
|
|||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
<AnchorPane prefHeight="500.0" prefWidth="855.0" xmlns="http://javafx.com/javafx/10.0.2-internal"
|
||||
<BorderPane prefHeight="500.0" prefWidth="855.0" xmlns="http://javafx.com/javafx/10.0.2-internal"
|
||||
xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.hitec.nhplus.nurse.AllNurseController">
|
||||
<children>
|
||||
<TableView fx:id="tableView" editable="true" layoutX="31.0" layoutY="40.0" AnchorPane.bottomAnchor="70.0"
|
||||
AnchorPane.leftAnchor="15.0" AnchorPane.rightAnchor="15.0" AnchorPane.topAnchor="80.0">
|
||||
<TableView fx:id="tableView" editable="true" layoutX="31.0" layoutY="40.0">
|
||||
<columns>
|
||||
<TableColumn fx:id="columnId" maxWidth="1200.0" minWidth="5.0" prefWidth="5.0" text="ID"/>
|
||||
<TableColumn fx:id="columnSurname" maxWidth="7500.0" minWidth="20.0" prefWidth="100.0" text="Nachname"/>
|
||||
|
@ -19,8 +18,7 @@
|
|||
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY"/>
|
||||
</columnResizePolicy>
|
||||
</TableView>
|
||||
<HBox layoutX="420.0" layoutY="450.0" spacing="10.0" AnchorPane.bottomAnchor="15.0" AnchorPane.leftAnchor="15.0"
|
||||
AnchorPane.rightAnchor="15.0">
|
||||
<HBox layoutX="420.0" layoutY="450.0" spacing="10.0">
|
||||
<children>
|
||||
<TextField fx:id="txfSurname" prefHeight="26.0" prefWidth="220.0" promptText="Nachname"/>
|
||||
<TextField fx:id="txfFirstname" prefHeight="26.0" prefWidth="220.0" promptText="Vorname"/>
|
||||
|
@ -29,8 +27,7 @@
|
|||
<Button fx:id="btnDelete" mnemonicParsing="false" prefWidth="90.0" text="Löschen"/>
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox alignment="TOP_CENTER" layoutX="10.0" layoutY="10.0" prefWidth="200.0" spacing="25.0"
|
||||
AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="5.0">
|
||||
<HBox alignment="TOP_CENTER" layoutX="10.0" layoutY="10.0" prefWidth="200.0" spacing="25.0">
|
||||
<children>
|
||||
<Label alignment="CENTER" contentDisplay="CENTER" minWidth="400.0" text="Pfleger/innen"
|
||||
textAlignment="CENTER">
|
||||
|
@ -44,4 +41,4 @@
|
|||
<padding>
|
||||
<Insets top="10.0"/>
|
||||
</padding>
|
||||
</AnchorPane>
|
||||
</BorderPane>
|
||||
|
|
Loading…
Reference in a new issue