| @@ -1,5 +1,6 @@ | |||||
| package de.uniluebeck.mi.projmi6; | package de.uniluebeck.mi.projmi6; | ||||
| import de.uniluebeck.mi.projmi6.controller.MainController; | |||||
| import javafx.application.Application; | import javafx.application.Application; | ||||
| import javafx.fxml.FXMLLoader; | import javafx.fxml.FXMLLoader; | ||||
| import javafx.scene.Parent; | import javafx.scene.Parent; | ||||
| @@ -10,8 +11,18 @@ public class Main extends Application { | |||||
| @Override | @Override | ||||
| public void start(Stage primaryStage) throws Exception { | public void start(Stage primaryStage) throws Exception { | ||||
| Parent root = FXMLLoader.load(getClass().getClassLoader().getResource("main.fxml")); | |||||
| primaryStage.setTitle("Hello World"); | |||||
| System.out.println(getClass().getClassLoader().getResource("").toExternalForm()); | |||||
| FXMLLoader fxmlLoader = new FXMLLoader(); | |||||
| fxmlLoader.setLocation(getClass().getClassLoader().getResource("main.fxml")); | |||||
| MainController mainController = new MainController(); | |||||
| fxmlLoader.setControllerFactory(mainController.getControllerFactory()); | |||||
| Parent root = fxmlLoader.load(); | |||||
| primaryStage.setTitle("KIS Gruppe 06"); | |||||
| primaryStage.setScene(new Scene(root, 800, 600)); | primaryStage.setScene(new Scene(root, 800, 600)); | ||||
| primaryStage.show(); | primaryStage.show(); | ||||
| } | } | ||||
| @@ -7,6 +7,7 @@ package de.uniluebeck.mi.projmi6.controller; | |||||
| import javafx.event.ActionEvent; | import javafx.event.ActionEvent; | ||||
| import javafx.fxml.FXML; | import javafx.fxml.FXML; | ||||
| import javafx.scene.control.Button; | import javafx.scene.control.Button; | ||||
| import javafx.event.ActionEvent; | |||||
| import javafx.scene.control.ComboBox; | import javafx.scene.control.ComboBox; | ||||
| import javafx.scene.control.Label; | import javafx.scene.control.Label; | ||||
| import javafx.scene.control.TextArea; | import javafx.scene.control.TextArea; | ||||
| @@ -3,10 +3,14 @@ package de.uniluebeck.mi.projmi6.controller; | |||||
| /** | /** | ||||
| * Created by 631806 on 12.11.15. | * Created by 631806 on 12.11.15. | ||||
| */ | */ | ||||
| import javafx.event.ActionEvent; | import javafx.event.ActionEvent; | ||||
| import javafx.fxml.FXML; | import javafx.fxml.FXML; | ||||
| import javafx.scene.control.*; | |||||
| import javafx.scene.control.Button; | |||||
| import javafx.scene.control.CheckBox; | |||||
| import javafx.scene.control.ComboBox; | |||||
| import javafx.scene.control.DatePicker; | |||||
| import javafx.scene.control.Label; | |||||
| import javafx.scene.control.TextField; | |||||
| public class FallController { | public class FallController { | ||||
| @@ -4,14 +4,55 @@ import javafx.fxml.FXML; | |||||
| import javafx.scene.control.Button; | import javafx.scene.control.Button; | ||||
| import javafx.scene.control.ChoiceBox; | import javafx.scene.control.ChoiceBox; | ||||
| import javafx.scene.control.ProgressIndicator; | import javafx.scene.control.ProgressIndicator; | ||||
| import javafx.util.Callback; | |||||
| import java.util.Set; | |||||
| public class MainController { | public class MainController { | ||||
| private FallController fallController; | private FallController fallController; | ||||
| private DiagnoseController diagnoseController; | |||||
| private PatientEditorController patientEditorController; | |||||
| private PatientTablesController patientTablesController; | |||||
| private SettingsController settingsController; | |||||
| private UntersuchungenController untersuchungenController; | |||||
| private StationsHistorieController stationsHistorieController; | |||||
| public MainController(){ | public MainController(){ | ||||
| fallController = new FallController(); | fallController = new FallController(); | ||||
| diagnoseController = new DiagnoseController(); | |||||
| patientEditorController = new PatientEditorController(); | |||||
| patientTablesController = new PatientTablesController(); | |||||
| settingsController = new SettingsController(); | |||||
| untersuchungenController = new UntersuchungenController(); | |||||
| stationsHistorieController = new StationsHistorieController(); | |||||
| } | |||||
| public Callback<Class<?>, Object> getControllerFactory(){ | |||||
| return clazz -> { | |||||
| if(clazz.equals(MainController.class)) { | |||||
| return this; | |||||
| }else if(clazz.equals(FallController.class)){ | |||||
| return fallController; | |||||
| }else if(clazz.equals(DiagnoseController.class)){ | |||||
| return diagnoseController; | |||||
| }else if(clazz.equals(PatientEditorController.class)) { | |||||
| return patientEditorController; | |||||
| }else if(clazz.equals(PatientTablesController.class)){ | |||||
| return patientTablesController; | |||||
| }else if(clazz.equals(SettingsController.class)){ | |||||
| return settingsController; | |||||
| } else if(clazz.equals(UntersuchungenController.class)) { | |||||
| return untersuchungenController; | |||||
| }else if(clazz.equals(StationsHistorieController.class)){ | |||||
| return stationsHistorieController; | |||||
| }else { | |||||
| System.err.println("Keine Controller-Klasse des Typs "+clazz+" gefunden!!!"); | |||||
| return null; | |||||
| } | |||||
| }; | |||||
| } | } | ||||
| @@ -19,6 +60,27 @@ public class MainController { | |||||
| return fallController; | return fallController; | ||||
| } | } | ||||
| public DiagnoseController getDiagnoseController(){ | |||||
| return diagnoseController; | |||||
| } | |||||
| public PatientEditorController getPatientEditorController(){ | |||||
| return patientEditorController; | |||||
| } | |||||
| public PatientTablesController getPatientTablesController(){ | |||||
| return patientTablesController; | |||||
| } | |||||
| public SettingsController getSettingsController(){ | |||||
| return settingsController; | |||||
| } | |||||
| public UntersuchungenController getUntersuchungenController(){ | |||||
| return untersuchungenController; | |||||
| } | |||||
| @FXML | @FXML | ||||
| private ChoiceBox<?> cmbUserChoose; | private ChoiceBox<?> cmbUserChoose; | ||||
| @@ -3,10 +3,14 @@ package de.uniluebeck.mi.projmi6.controller; | |||||
| /** | /** | ||||
| * Created by 631806 on 12.11.15. | * Created by 631806 on 12.11.15. | ||||
| */ | */ | ||||
| import javafx.event.ActionEvent; | |||||
| import javafx.fxml.FXML; | import javafx.fxml.FXML; | ||||
| import javafx.scene.control.*; | |||||
| import javafx.scene.control.Button; | |||||
| import javafx.scene.control.ComboBox; | |||||
| import javafx.scene.control.DatePicker; | |||||
| import javafx.scene.control.Label; | |||||
| import javafx.scene.control.TextArea; | |||||
| import javafx.event.ActionEvent; | |||||
| import javafx.scene.control.TextField; | |||||
| public class PatientEditorController { | public class PatientEditorController { | ||||
| @@ -0,0 +1,7 @@ | |||||
| package de.uniluebeck.mi.projmi6.controller; | |||||
| /** | |||||
| * Created by 631806 on 12.11.15. | |||||
| */ | |||||
| public class StationsHistorieController { | |||||
| } | |||||
| @@ -6,7 +6,7 @@ | |||||
| <?import javafx.scene.control.*?> | <?import javafx.scene.control.*?> | ||||
| <?import javafx.scene.layout.*?> | <?import javafx.scene.layout.*?> | ||||
| <SplitPane dividerPositions="0.5" prefHeight="409.0" prefWidth="662.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"> | |||||
| <SplitPane dividerPositions="0.5" prefHeight="409.0" prefWidth="662.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.uniluebeck.mi.projmi6.controller.DiagnoseController"> | |||||
| <items> | <items> | ||||
| <VBox> | <VBox> | ||||
| <children> | <children> | ||||
| @@ -6,7 +6,7 @@ | |||||
| <?import java.lang.*?> | <?import java.lang.*?> | ||||
| <?import javafx.scene.layout.*?> | <?import javafx.scene.layout.*?> | ||||
| <VBox prefHeight="318.0" prefWidth="606.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"> | |||||
| <VBox fx:controller="de.uniluebeck.mi.projmi6.controller.FallController" prefHeight="318.0" prefWidth="606.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"> | |||||
| <children> | <children> | ||||
| <GridPane vgap="5.0"> | <GridPane vgap="5.0"> | ||||
| <children> | <children> | ||||
| @@ -6,7 +6,7 @@ | |||||
| <?import javafx.scene.control.*?> | <?import javafx.scene.control.*?> | ||||
| <?import javafx.scene.layout.*?> | <?import javafx.scene.layout.*?> | ||||
| <VBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="784.0" prefWidth="700.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"> | |||||
| <VBox fx:controller="de.uniluebeck.mi.projmi6.controller.MainController" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="784.0" prefWidth="700.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"> | |||||
| <children> | <children> | ||||
| <TabPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" side="LEFT" tabClosingPolicy="UNAVAILABLE" VBox.vgrow="ALWAYS"> | <TabPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" side="LEFT" tabClosingPolicy="UNAVAILABLE" VBox.vgrow="ALWAYS"> | ||||
| <tabs> | <tabs> | ||||
| @@ -6,7 +6,7 @@ | |||||
| <?import java.lang.*?> | <?import java.lang.*?> | ||||
| <?import javafx.scene.layout.*?> | <?import javafx.scene.layout.*?> | ||||
| <VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="633.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"> | |||||
| <VBox fx:controller="de.uniluebeck.mi.projmi6.controller.PatientEditorController" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="633.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"> | |||||
| <children> | <children> | ||||
| <GridPane> | <GridPane> | ||||
| <columnConstraints> | <columnConstraints> | ||||
| @@ -6,7 +6,7 @@ | |||||
| <?import javafx.scene.control.*?> | <?import javafx.scene.control.*?> | ||||
| <?import javafx.scene.layout.*?> | <?import javafx.scene.layout.*?> | ||||
| <TabPane xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"> | |||||
| <TabPane fx:controller="de.uniluebeck.mi.projmi6.controller.PatientTablesController" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"> | |||||
| <tabs> | <tabs> | ||||
| <Tab closable="false" text="Patientenübersicht"> | <Tab closable="false" text="Patientenübersicht"> | ||||
| <content> | <content> | ||||
| @@ -4,7 +4,7 @@ | |||||
| <?import javafx.scene.control.*?> | <?import javafx.scene.control.*?> | ||||
| <?import javafx.scene.layout.*?> | <?import javafx.scene.layout.*?> | ||||
| <?import javafx.scene.text.*?> | <?import javafx.scene.text.*?> | ||||
| <TilePane xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8" fx:controller="SettingsController"> | |||||
| <TilePane fx:controller="de.uniluebeck.mi.projmi6.controller.SettingsController" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8" > | |||||
| <children> | <children> | ||||
| <VBox prefHeight="150.0" prefWidth="300.0" style="-fx-background-color: white; -fx-background-radius: 10;" | <VBox prefHeight="150.0" prefWidth="300.0" style="-fx-background-color: white; -fx-background-radius: 10;" | ||||
| styleClass="settings-box"> | styleClass="settings-box"> | ||||
| @@ -6,7 +6,7 @@ | |||||
| <?import javafx.scene.control.*?> | <?import javafx.scene.control.*?> | ||||
| <?import javafx.scene.layout.*?> | <?import javafx.scene.layout.*?> | ||||
| <SplitPane dividerPositions="0.5" prefHeight="331.0" prefWidth="730.0" xmlns="http://javafx.com/javafx/8" | |||||
| <SplitPane fx:controller="de.uniluebeck.mi.projmi6.controller.StationsHistorieController" dividerPositions="0.5" prefHeight="331.0" prefWidth="730.0" xmlns="http://javafx.com/javafx/8" | |||||
| xmlns:fx="http://javafx.com/fxml/1"> | xmlns:fx="http://javafx.com/fxml/1"> | ||||
| <items> | <items> | ||||
| <VBox> | <VBox> | ||||
| @@ -4,7 +4,7 @@ | |||||
| <?import javafx.scene.control.*?> | <?import javafx.scene.control.*?> | ||||
| <?import javafx.scene.layout.*?> | <?import javafx.scene.layout.*?> | ||||
| <SplitPane xmlns:fx="http://javafx.com/fxml/1" dividerPositions="0.45" prefHeight="421.0" prefWidth="652.0" | <SplitPane xmlns:fx="http://javafx.com/fxml/1" dividerPositions="0.45" prefHeight="421.0" prefWidth="652.0" | ||||
| xmlns="http://javafx.com/javafx/8" fx:controller="ControllerUntersuchungen"> | |||||
| xmlns="http://javafx.com/javafx/8" fx:controller="de.uniluebeck.mi.projmi6.controller.UntersuchungenController"> | |||||
| <items> | <items> | ||||
| <VBox> | <VBox> | ||||
| <children> | <children> | ||||