Refaktoring #21

Merged
SZUT-Dominik merged 12 commits from refactor into main 2024-04-30 12:21:17 +00:00
5 changed files with 249 additions and 238 deletions
Showing only changes of commit 54ef21fb36 - Show all commits

View file

@ -2,8 +2,8 @@ package de.hitec.nhplus.treatment;
import de.hitec.nhplus.Main; import de.hitec.nhplus.Main;
import de.hitec.nhplus.datastorage.DaoFactory; import de.hitec.nhplus.datastorage.DaoFactory;
import de.hitec.nhplus.patient.PatientDao;
import de.hitec.nhplus.patient.Patient; import de.hitec.nhplus.patient.Patient;
import de.hitec.nhplus.patient.PatientDao;
import javafx.collections.FXCollections; import javafx.collections.FXCollections;
import javafx.collections.ObservableList; import javafx.collections.ObservableList;
import javafx.fxml.FXML; import javafx.fxml.FXML;
@ -18,8 +18,7 @@ import java.io.IOException;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.ArrayList; import java.util.ArrayList;
public class AllTreatmentController public class AllTreatmentController {
{
@FXML @FXML
private TableView<Treatment> tableView; private TableView<Treatment> tableView;
@ -53,8 +52,7 @@ public class AllTreatmentController
private final ObservableList<String> patientSelection = FXCollections.observableArrayList(); private final ObservableList<String> patientSelection = FXCollections.observableArrayList();
private ArrayList<Patient> patientList; private ArrayList<Patient> patientList;
public void initialize() public void initialize() {
{
readAllAndShowInTableView(); readAllAndShowInTableView();
comboBoxPatientSelection.setItems(patientSelection); comboBoxPatientSelection.setItems(patientSelection);
comboBoxPatientSelection.getSelectionModel().select(0); comboBoxPatientSelection.getSelectionModel().select(0);
@ -69,86 +67,69 @@ public class AllTreatmentController
this.buttonDelete.setDisable(true); this.buttonDelete.setDisable(true);
this.tableView this.tableView
.getSelectionModel() .getSelectionModel()
.selectedItemProperty() .selectedItemProperty()
.addListener((observableValue, oldTreatment, newTreatment) -> .addListener((observableValue, oldTreatment, newTreatment) ->
{ {
AllTreatmentController.this.buttonDelete.setDisable(newTreatment == null); AllTreatmentController.this.buttonDelete.setDisable(newTreatment == null);
} }
); );
this.createComboBoxData(); this.createComboBoxData();
} }
public void readAllAndShowInTableView() public void readAllAndShowInTableView() {
{
this.treatments.clear(); this.treatments.clear();
comboBoxPatientSelection.getSelectionModel().select(0); comboBoxPatientSelection.getSelectionModel().select(0);
this.dao = DaoFactory.getDaoFactory().createTreatmentDao(); this.dao = DaoFactory.getDaoFactory().createTreatmentDao();
try try {
{
this.treatments.addAll(dao.readAll()); this.treatments.addAll(dao.readAll());
} catch (SQLException exception) } catch (SQLException exception) {
{
exception.printStackTrace(); exception.printStackTrace();
} }
} }
private void createComboBoxData() private void createComboBoxData() {
{
PatientDao dao = DaoFactory.getDaoFactory().createPatientDAO(); PatientDao dao = DaoFactory.getDaoFactory().createPatientDAO();
try try {
{
patientList = (ArrayList<Patient>) dao.readAll(); patientList = (ArrayList<Patient>) dao.readAll();
this.patientSelection.add("alle"); this.patientSelection.add("alle");
for (Patient patient : patientList) for (Patient patient : patientList) {
{
this.patientSelection.add(patient.getSurname()); this.patientSelection.add(patient.getSurname());
} }
} catch (SQLException exception) } catch (SQLException exception) {
{
exception.printStackTrace(); exception.printStackTrace();
} }
} }
@FXML @FXML
public void handleComboBox() public void handleComboBox() {
{
String selectedPatient = this.comboBoxPatientSelection.getSelectionModel().getSelectedItem(); String selectedPatient = this.comboBoxPatientSelection.getSelectionModel().getSelectedItem();
this.treatments.clear(); this.treatments.clear();
this.dao = DaoFactory.getDaoFactory().createTreatmentDao(); this.dao = DaoFactory.getDaoFactory().createTreatmentDao();
if (selectedPatient.equals("alle")) if (selectedPatient.equals("alle")) {
{ try {
try
{
this.treatments.addAll(this.dao.readAll()); this.treatments.addAll(this.dao.readAll());
} catch (SQLException exception) } catch (SQLException exception) {
{
exception.printStackTrace(); exception.printStackTrace();
} }
} }
Patient patient = searchInList(selectedPatient); Patient patient = searchInList(selectedPatient);
if (patient != null) if (patient != null) {
{ try {
try
{
this.treatments.addAll(this.dao.readTreatmentsByPid(patient.getId())); this.treatments.addAll(this.dao.readTreatmentsByPid(patient.getId()));
} catch (SQLException exception) } catch (SQLException exception) {
{
exception.printStackTrace(); exception.printStackTrace();
} }
} }
} }
private Patient searchInList(String surname) private Patient searchInList(String surname) {
{ for (Patient patient : this.patientList) {
for (Patient patient : this.patientList) if (patient.getSurname().equals(surname)) {
{
if (patient.getSurname().equals(surname))
{
return patient; return patient;
} }
} }
@ -156,30 +137,24 @@ public class AllTreatmentController
} }
@FXML @FXML
public void handleDelete() public void handleDelete() {
{
int index = this.tableView.getSelectionModel().getSelectedIndex(); int index = this.tableView.getSelectionModel().getSelectedIndex();
Treatment t = this.treatments.remove(index); Treatment t = this.treatments.remove(index);
TreatmentDao dao = DaoFactory.getDaoFactory().createTreatmentDao(); TreatmentDao dao = DaoFactory.getDaoFactory().createTreatmentDao();
try try {
{
dao.deleteById(t.getId()); dao.deleteById(t.getId());
} catch (SQLException exception) } catch (SQLException exception) {
{
exception.printStackTrace(); exception.printStackTrace();
} }
} }
@FXML @FXML
public void handleNewTreatment() public void handleNewTreatment() {
{ try {
try
{
String selectedPatient = this.comboBoxPatientSelection.getSelectionModel().getSelectedItem(); String selectedPatient = this.comboBoxPatientSelection.getSelectionModel().getSelectedItem();
Patient patient = searchInList(selectedPatient); Patient patient = searchInList(selectedPatient);
newTreatmentWindow(patient); newTreatmentWindow(patient);
} catch (NullPointerException exception) } catch (NullPointerException exception) {
{
Alert alert = new Alert(Alert.AlertType.INFORMATION); Alert alert = new Alert(Alert.AlertType.INFORMATION);
alert.setTitle("Information"); alert.setTitle("Information");
alert.setHeaderText("Patient für die Behandlung fehlt!"); alert.setHeaderText("Patient für die Behandlung fehlt!");
@ -189,12 +164,10 @@ public class AllTreatmentController
} }
@FXML @FXML
public void handleMouseClick() public void handleMouseClick() {
{
tableView.setOnMouseClicked(event -> tableView.setOnMouseClicked(event ->
{ {
if (event.getClickCount() == 2 && (tableView.getSelectionModel().getSelectedItem() != null)) if (event.getClickCount() == 2 && (tableView.getSelectionModel().getSelectedItem() != null)) {
{
int index = this.tableView.getSelectionModel().getSelectedIndex(); int index = this.tableView.getSelectionModel().getSelectedIndex();
Treatment treatment = this.treatments.get(index); Treatment treatment = this.treatments.get(index);
treatmentWindow(treatment); treatmentWindow(treatment);
@ -202,11 +175,11 @@ public class AllTreatmentController
}); });
} }
public void newTreatmentWindow(Patient patient) public void newTreatmentWindow(Patient patient) {
{ try {
try FXMLLoader loader = new FXMLLoader(
{ Main.class.getResource("/de/hitec/nhplus/treatment/NewTreatmentView.fxml")
FXMLLoader loader = new FXMLLoader(Main.class.getResource("/de/hitec/nhplus/treatment/NewTreatmentView.fxml")); );
AnchorPane pane = loader.load(); AnchorPane pane = loader.load();
Scene scene = new Scene(pane); Scene scene = new Scene(pane);
@ -219,16 +192,13 @@ public class AllTreatmentController
stage.setScene(scene); stage.setScene(scene);
stage.setResizable(false); stage.setResizable(false);
stage.showAndWait(); stage.showAndWait();
} catch (IOException exception) } catch (IOException exception) {
{
exception.printStackTrace(); exception.printStackTrace();
} }
} }
public void treatmentWindow(Treatment treatment) public void treatmentWindow(Treatment treatment) {
{ try {
try
{
FXMLLoader loader = new FXMLLoader(Main.class.getResource("/de/hitec/nhplus/treatment/TreatmentView.fxml")); FXMLLoader loader = new FXMLLoader(Main.class.getResource("/de/hitec/nhplus/treatment/TreatmentView.fxml"));
AnchorPane pane = loader.load(); AnchorPane pane = loader.load();
Scene scene = new Scene(pane); Scene scene = new Scene(pane);
@ -241,8 +211,7 @@ public class AllTreatmentController
stage.setScene(scene); stage.setScene(scene);
stage.setResizable(false); stage.setResizable(false);
stage.showAndWait(); stage.showAndWait();
} catch (IOException exception) } catch (IOException exception) {
{
exception.printStackTrace(); exception.printStackTrace();
} }
} }

View file

@ -1,4 +1,6 @@
.vBox{ /* https://materialui.co/colors */
-fx-background-color: navy; .tabs{
-fx-border-color: rgb(142, 142, 142); -fx-background-color: #1565C0;
-fx-padding: 4px;
-fx-spacing: 4px;
} }

View file

@ -1,25 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?> <?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?> <?import javafx.scene.control.Button?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.HBox?>
<BorderPane fx:id="mainBorderPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="688.0" prefWidth="926.0" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.hitec.nhplus.main.MainWindowController"> <BorderPane
<left> fx:id="mainBorderPane"
<VBox id="vBox" alignment="CENTER" spacing="50.0" styleClass="vBox" stylesheets="@Application.css" BorderPane.alignment="CENTER"> maxHeight="-Infinity"
<children> maxWidth="-Infinity"
<Button alignment="CENTER" contentDisplay="CENTER" mnemonicParsing="false" onAction="#handleShowAllPatient" prefWidth="105.0" text="Patienten/innen"> minHeight="-Infinity"
<VBox.margin> minWidth="-Infinity"
<Insets bottom="50.0" left="10.0" right="10.0" top="50.0" /> prefHeight="688.0"
</VBox.margin> prefWidth="926.0"
<opaqueInsets> xmlns="http://javafx.com/javafx/10.0.2-internal"
<Insets /> xmlns:fx="http://javafx.com/fxml/1"
</opaqueInsets></Button> fx:controller="de.hitec.nhplus.main.MainWindowController">
<Button alignment="CENTER" contentDisplay="CENTER" mnemonicParsing="false" onAction="#handleShowAllTreatments" prefWidth="105.0" text="Behandlungen"> <top>
<VBox.margin> <HBox id="tabs" alignment="CENTER_LEFT" styleClass="tabs" stylesheets="@Application.css">
<Insets bottom="50.0" left="10.0" right="10.0" top="50.0" /> <children>
</VBox.margin></Button> <Button
</children> alignment="CENTER"
</VBox> contentDisplay="CENTER"
</left> mnemonicParsing="false"
onAction="#handleShowAllPatient"
prefWidth="105.0"
text="Patienten"
>
<opaqueInsets>
<Insets/>
</opaqueInsets>
</Button>
<Button
alignment="CENTER"
contentDisplay="CENTER"
mnemonicParsing="false"
onAction="#handleShowAllTreatments"
prefWidth="105.0"
text="Behandlungen"
></Button>
</children>
</HBox>
</top>
</BorderPane> </BorderPane>

View file

@ -1,78 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?> <?import javafx.scene.control.*?>
<?import javafx.scene.control.Label?> <?import javafx.scene.layout.*?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<AnchorPane
<AnchorPane prefHeight="500.0" prefWidth="855.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.hitec.nhplus.patient.AllPatientController"> prefHeight="500.0"
<children> prefWidth="855.0"
<TableView fx:id="tableView" editable="true" layoutX="31.0" layoutY="120.0" prefHeight="287.0" prefWidth="825.0" AnchorPane.bottomAnchor="100.0" AnchorPane.leftAnchor="15.0" AnchorPane.rightAnchor="15.0" AnchorPane.topAnchor="80.0"> xmlns="http://javafx.com/javafx/11.0.1"
<columns> xmlns:fx="http://javafx.com/fxml/1"
<TableColumn fx:id="columnId" maxWidth="1200.0" minWidth="5.0" prefWidth="5.0" text="ID" /> fx:controller="de.hitec.nhplus.patient.AllPatientController">
<TableColumn fx:id="columnSurname" maxWidth="7500.0" minWidth="20.0" onEditCommit="#handleOnEditSurname" prefWidth="100.0" text="Nachname" /> <children>
<TableColumn fx:id="columnFirstName" maxWidth="7500.0" onEditCommit="#handleOnEditFirstname" prefWidth="75.0" text="Vorname" /> <TableView
<TableColumn fx:id="columnDateOfBirth" maxWidth="7500.0" onEditCommit="#handleOnEditDateOfBirth" prefWidth="75.0" text="Geburtstag" /> fx:id="tableView"
<TableColumn fx:id="columnCareLevel" onEditCommit="#handleOnEditCareLevel" prefWidth="75.0" text="Pflegegrad" /> editable="true" layoutX="31.0"
<TableColumn fx:id="columnRoomNumber" onEditCommit="#handleOnEditRoomNumber" prefWidth="75.0" text="Raum" /> layoutY="120.0" prefHeight="287.0"
</columns> prefWidth="825.0"
<columnResizePolicy> AnchorPane.bottomAnchor="100.0"
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> AnchorPane.leftAnchor="15.0"
</columnResizePolicy> AnchorPane.rightAnchor="15.0"
</TableView> AnchorPane.topAnchor="80.0">
<HBox layoutX="623.0" layoutY="419.3999938964844" spacing="10.0" AnchorPane.bottomAnchor="15.0" AnchorPane.leftAnchor="15.0" AnchorPane.rightAnchor="15.0"> <columns>
<children> <TableColumn fx:id="columnId" maxWidth="-1.0" minWidth="40.0" prefWidth="5.0" text="ID"/>
<GridPane hgap="10.0" vgap="10.0"> <TableColumn fx:id="columnSurname" maxWidth="-1.0" minWidth="140.0" onEditCommit="#handleOnEditSurname"
<columnConstraints> prefWidth="100.0" text="Nachname"/>
<ColumnConstraints halignment="LEFT" hgrow="SOMETIMES" prefWidth="200.0" /> <TableColumn fx:id="columnFirstName" maxWidth="-1.00" minWidth="140.0"
<ColumnConstraints halignment="LEFT" hgrow="SOMETIMES" minWidth="200.0" prefWidth="200.0" /> onEditCommit="#handleOnEditFirstname" prefWidth="75.0" text="Vorname"/>
<ColumnConstraints halignment="LEFT" hgrow="SOMETIMES" minWidth="10.0" prefWidth="160.0" /> <TableColumn fx:id="columnDateOfBirth" maxWidth="-1.0" minWidth="140.0"
</columnConstraints> onEditCommit="#handleOnEditDateOfBirth" prefWidth="75.0" text="Geburtstag"/>
<rowConstraints> <TableColumn fx:id="columnCareLevel" maxWidth="-1.0" minWidth="140.0"
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> onEditCommit="#handleOnEditCareLevel" prefWidth="75.0" text="Pflegegrad"/>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <TableColumn fx:id="columnRoomNumber" maxWidth="-1.0" minWidth="140.0"
</rowConstraints> onEditCommit="#handleOnEditRoomNumber" prefWidth="75.0" text="Raum"/>
<children> </columns>
<TextField fx:id="textFieldFirstName" minWidth="200.0" prefHeight="26.0" prefWidth="200.0" promptText="Vorname" /> <columnResizePolicy>
<TextField fx:id="textFieldSurname" minWidth="200.0" prefHeight="26.0" prefWidth="200.0" promptText="Nachname" GridPane.columnIndex="1" /> <TableView fx:constant="CONSTRAINED_RESIZE_POLICY"/>
<TextField fx:id="textFieldDateOfBirth" minWidth="160.0" prefWidth="160.0" promptText="Geburtstag" GridPane.columnIndex="2" /> </columnResizePolicy>
<TextField fx:id="textFieldCareLevel" prefHeight="26.0" prefWidth="200.0" promptText="Pflegegrad" GridPane.rowIndex="1" /> </TableView>
<TextField fx:id="textFieldRoomNumber" prefHeight="26.0" prefWidth="200.0" promptText="Raum" GridPane.columnIndex="1" GridPane.rowIndex="1" /> <HBox layoutX="623.0" layoutY="419.3999938964844" spacing="10.0" AnchorPane.bottomAnchor="15.0"
</children> AnchorPane.leftAnchor="15.0" AnchorPane.rightAnchor="15.0">
<padding> <children>
<Insets right="10.0" /> <GridPane hgap="10.0" vgap="10.0">
</padding> <columnConstraints>
<HBox.margin> <ColumnConstraints halignment="LEFT" hgrow="SOMETIMES" prefWidth="200.0"/>
<Insets /> <ColumnConstraints halignment="LEFT" hgrow="SOMETIMES" minWidth="200.0" prefWidth="200.0"/>
</HBox.margin> <ColumnConstraints halignment="LEFT" hgrow="SOMETIMES" minWidth="10.0" prefWidth="160.0"/>
</GridPane> </columnConstraints>
<HBox alignment="TOP_CENTER" prefWidth="190.0" spacing="10.0"> <rowConstraints>
<children> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
<Button fx:id="buttonAdd" mnemonicParsing="false" onAction="#handleAdd" prefWidth="90.0" text="Hinzufügen" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
<Button fx:id="buttonDelete" mnemonicParsing="false" onAction="#handleDelete" prefWidth="90.0" text="Löschen" /> </rowConstraints>
</children> <children>
</HBox> <TextField fx:id="textFieldFirstName" minWidth="200.0" prefHeight="26.0" prefWidth="200.0"
</children> promptText="Vorname"/>
</HBox> <TextField fx:id="textFieldSurname" minWidth="200.0" prefHeight="26.0" prefWidth="200.0"
<HBox alignment="TOP_CENTER" layoutX="10.0" layoutY="10.0" prefWidth="200.0" spacing="25.0" AnchorPane.leftAnchor="15.0" AnchorPane.rightAnchor="15.0" AnchorPane.topAnchor="5.0"> promptText="Nachname" GridPane.columnIndex="1"/>
<children> <TextField fx:id="textFieldDateOfBirth" minWidth="160.0" prefWidth="160.0"
<Label alignment="CENTER" contentDisplay="CENTER" minWidth="400.0" text="Patienten/innen" textAlignment="CENTER"> promptText="Geburtstag" GridPane.columnIndex="2"/>
<font> <TextField fx:id="textFieldCareLevel" prefHeight="26.0" prefWidth="200.0"
<Font size="36.0" /> promptText="Pflegegrad" GridPane.rowIndex="1"/>
</font> <TextField fx:id="textFieldRoomNumber" prefHeight="26.0" prefWidth="200.0" promptText="Raum"
</Label> GridPane.columnIndex="1" GridPane.rowIndex="1"/>
</children> </children>
</HBox> <padding>
</children> <Insets right="10.0"/>
<padding> </padding>
<Insets top="10.0" /> <HBox.margin>
</padding> <Insets/>
</HBox.margin>
</GridPane>
<HBox alignment="TOP_CENTER" prefWidth="190.0" spacing="10.0">
<children>
<Button fx:id="buttonAdd" mnemonicParsing="false" onAction="#handleAdd" prefWidth="90.0"
text="Hinzufügen"/>
<Button fx:id="buttonDelete" mnemonicParsing="false" onAction="#handleDelete" prefWidth="90.0"
text="Löschen"/>
</children>
</HBox>
</children>
</HBox>
<HBox alignment="TOP_CENTER" layoutX="10.0" layoutY="10.0" prefWidth="200.0" spacing="25.0"
AnchorPane.leftAnchor="15.0" AnchorPane.rightAnchor="15.0" AnchorPane.topAnchor="5.0">
<children>
<Label alignment="CENTER" contentDisplay="CENTER" minWidth="400.0" text="Patienten"
textAlignment="CENTER">
<font>
<Font size="36.0"/>
</font>
</Label>
</children>
</HBox>
</children>
<padding>
<Insets top="10.0"/>
</padding>
</AnchorPane> </AnchorPane>

View file

@ -1,70 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?> <?import javafx.scene.control.*?>
<?import javafx.scene.control.ComboBox?> <?import javafx.scene.layout.*?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<AnchorPane prefHeight="500.0" prefWidth="855.0" xmlns="http://javafx.com/javafx/11.0.1"
<AnchorPane prefHeight="500.0" prefWidth="855.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.hitec.nhplus.treatment.AllTreatmentController"> xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.hitec.nhplus.treatment.AllTreatmentController">
<children> <children>
<TableView fx:id="tableView" editable="true" layoutX="31.0" layoutY="35.0" onMouseClicked="#handleMouseClick" prefHeight="364.0" prefWidth="825.0" AnchorPane.bottomAnchor="75.0" AnchorPane.leftAnchor="15.0" AnchorPane.rightAnchor="15.0" AnchorPane.topAnchor="80.0"> <TableView fx:id="tableView" editable="true" layoutX="31.0" layoutY="35.0" onMouseClicked="#handleMouseClick"
<columns> prefHeight="364.0" prefWidth="825.0" AnchorPane.bottomAnchor="75.0" AnchorPane.leftAnchor="15.0"
<TableColumn fx:id="columnId" maxWidth="-1.0" minWidth="40.0" prefWidth="50.0" text="ID" /> AnchorPane.rightAnchor="15.0" AnchorPane.topAnchor="80.0">
<TableColumn fx:id="columnPatientId" maxWidth="-1.0" minWidth="100.0" prefWidth="120.0" text="PatientID" /> <columns>
<TableColumn fx:id="columnDate" maxWidth="-1.0" minWidth="140.0" prefWidth="150.0" text="Datum" /> <TableColumn fx:id="columnId" maxWidth="-1.0" minWidth="40.0" prefWidth="50.0" text="ID"/>
<TableColumn fx:id="columnBegin" maxWidth="-1.0" minWidth="140.0" prefWidth="150.0" text="Beginn" /> <TableColumn fx:id="columnPatientId" maxWidth="-1.0" minWidth="40.0" prefWidth="120.0"
<TableColumn fx:id="columnEnd" maxWidth="-1.0" minWidth="140.0" prefWidth="150.0" text="Ende" /> text="PatientID"/>
<TableColumn fx:id="columnDescription" maxWidth="-1.0" minWidth="200.0" prefWidth="300.0" text="Kurzbeschreibung" /> <TableColumn fx:id="columnDate" maxWidth="-1.0" minWidth="140.0" prefWidth="150.0" text="Datum"/>
</columns> <TableColumn fx:id="columnBegin" maxWidth="-1.0" minWidth="140.0" prefWidth="150.0" text="Beginn"/>
<columnResizePolicy> <TableColumn fx:id="columnEnd" maxWidth="-1.0" minWidth="140.0" prefWidth="150.0" text="Ende"/>
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> <TableColumn fx:id="columnDescription" maxWidth="-1.0" minWidth="200.0" prefWidth="300.0"
</columnResizePolicy> text="Kurzbeschreibung"/>
</TableView> </columns>
<HBox layoutX="623.0" layoutY="419.3999938964844" spacing="10.0" AnchorPane.bottomAnchor="15.0" AnchorPane.leftAnchor="15.0" AnchorPane.rightAnchor="15.0"> <columnResizePolicy>
<children> <TableView fx:constant="CONSTRAINED_RESIZE_POLICY"/>
<GridPane hgap="10.0" vgap="10.0"> </columnResizePolicy>
<columnConstraints> </TableView>
<ColumnConstraints halignment="LEFT" hgrow="SOMETIMES" prefWidth="200.0" /> <HBox layoutX="623.0" layoutY="419.3999938964844" spacing="10.0" AnchorPane.bottomAnchor="15.0"
<ColumnConstraints halignment="LEFT" hgrow="SOMETIMES" minWidth="200.0" prefWidth="200.0" /> AnchorPane.leftAnchor="15.0" AnchorPane.rightAnchor="15.0">
<ColumnConstraints halignment="LEFT" hgrow="SOMETIMES" minWidth="10.0" prefWidth="160.0" /> <children>
</columnConstraints> <GridPane hgap="10.0" vgap="10.0">
<rowConstraints> <columnConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <ColumnConstraints halignment="LEFT" hgrow="SOMETIMES" prefWidth="200.0"/>
</rowConstraints> <ColumnConstraints halignment="LEFT" hgrow="SOMETIMES" minWidth="200.0" prefWidth="200.0"/>
<children> <ColumnConstraints halignment="LEFT" hgrow="SOMETIMES" minWidth="10.0" prefWidth="160.0"/>
<Button fx:id="buttonNewTreament" mnemonicParsing="false" onAction="#handleNewTreatment" prefWidth="200.0" text="neue Behandlung anlegen" GridPane.columnIndex="1" /> </columnConstraints>
<ComboBox fx:id="comboBoxPatientSelection" minWidth="160.0" onAction="#handleComboBox" prefWidth="200.0" /> <rowConstraints>
<Button fx:id="buttonDelete" mnemonicParsing="false" onAction="#handleDelete" prefWidth="200.0" text="Löschen" GridPane.columnIndex="2" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
</children> </rowConstraints>
<padding> <children>
<Insets right="10.0" /> <Button fx:id="buttonNewTreament" mnemonicParsing="false" onAction="#handleNewTreatment"
</padding> prefWidth="200.0" text="neue Behandlung anlegen" GridPane.columnIndex="1"/>
<HBox.margin> <ComboBox fx:id="comboBoxPatientSelection" minWidth="160.0" onAction="#handleComboBox"
<Insets /> prefWidth="200.0"/>
</HBox.margin> <Button fx:id="buttonDelete" mnemonicParsing="false" onAction="#handleDelete" prefWidth="200.0"
</GridPane> text="Löschen" GridPane.columnIndex="2"/>
<HBox prefWidth="190.0" spacing="10.0" /> </children>
</children> <padding>
</HBox> <Insets right="10.0"/>
<HBox alignment="TOP_CENTER" layoutX="10.0" layoutY="10.0" prefWidth="200.0" spacing="25.0" AnchorPane.leftAnchor="15.0" AnchorPane.rightAnchor="15.0" AnchorPane.topAnchor="15.0"> </padding>
<children> <HBox.margin>
<Label alignment="CENTER" contentDisplay="CENTER" minWidth="400.0" text="Behandlungen" textAlignment="CENTER"> <Insets/>
<font> </HBox.margin>
<Font size="36.0" /> </GridPane>
</font> <HBox prefWidth="190.0" spacing="10.0"/>
</Label> </children>
</children> </HBox>
</HBox> <HBox alignment="TOP_CENTER" layoutX="10.0" layoutY="10.0" prefWidth="200.0" spacing="25.0"
</children> AnchorPane.leftAnchor="15.0" AnchorPane.rightAnchor="15.0" AnchorPane.topAnchor="5.0">
<padding> <children>
<Insets top="10.0" /> <Label alignment="CENTER" contentDisplay="CENTER" minWidth="400.0" text="Behandlungen"
</padding> textAlignment="CENTER">
<font>
<Font size="36.0"/>
</font>
</Label>
</children>
</HBox>
</children>
<padding>
<Insets top="10.0"/>
</padding>
</AnchorPane> </AnchorPane>