Browse Source

Initialer Run mit Controllern

hapi
Johannes Oehm 10 years ago
parent
commit
4923dd75e9
14 changed files with 87 additions and 10 deletions
  1. +13
    -2
      src/main/java/de/uniluebeck/mi/projmi6/Main.java
  2. +1
    -0
      src/main/java/de/uniluebeck/mi/projmi6/controller/DiagnoseController.java
  3. +1
    -0
      src/main/java/de/uniluebeck/mi/projmi6/controller/FallController.java
  4. +56
    -0
      src/main/java/de/uniluebeck/mi/projmi6/controller/MainController.java
  5. +1
    -0
      src/main/java/de/uniluebeck/mi/projmi6/controller/PatientEditorController.java
  6. +7
    -0
      src/main/java/de/uniluebeck/mi/projmi6/controller/StationsHistorieController.java
  7. +1
    -1
      src/main/resources/diagnose.fxml
  8. +1
    -1
      src/main/resources/fall.fxml
  9. +1
    -1
      src/main/resources/main.fxml
  10. +1
    -1
      src/main/resources/patient_edit.fxml
  11. +1
    -1
      src/main/resources/patient_tables.fxml
  12. +1
    -1
      src/main/resources/settings.fxml
  13. +1
    -1
      src/main/resources/stationshistorie.fxml
  14. +1
    -1
      src/main/resources/untersuchungen.fxml

+ 13
- 2
src/main/java/de/uniluebeck/mi/projmi6/Main.java View File

@@ -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();
} }


+ 1
- 0
src/main/java/de/uniluebeck/mi/projmi6/controller/DiagnoseController.java View File

@@ -5,6 +5,7 @@ package de.uniluebeck.mi.projmi6.controller;
*/ */
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;


+ 1
- 0
src/main/java/de/uniluebeck/mi/projmi6/controller/FallController.java View File

@@ -3,6 +3,7 @@ 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.Button; import javafx.scene.control.Button;
import javafx.scene.control.CheckBox; import javafx.scene.control.CheckBox;


+ 56
- 0
src/main/java/de/uniluebeck/mi/projmi6/controller/MainController.java View File

@@ -4,6 +4,9 @@ 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 {


@@ -11,6 +14,9 @@ public class MainController {
private DiagnoseController diagnoseController; private DiagnoseController diagnoseController;
private PatientEditorController patientEditorController; private PatientEditorController patientEditorController;
private PatientTablesController patientTablesController; private PatientTablesController patientTablesController;
private SettingsController settingsController;
private UntersuchungenController untersuchungenController;
private StationsHistorieController stationsHistorieController;




public MainController(){ public MainController(){
@@ -18,6 +24,35 @@ public class MainController {
diagnoseController = new DiagnoseController(); diagnoseController = new DiagnoseController();
patientEditorController = new PatientEditorController(); patientEditorController = new PatientEditorController();
patientTablesController = new PatientTablesController(); 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;
}

};
} }




@@ -25,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;




+ 1
- 0
src/main/java/de/uniluebeck/mi/projmi6/controller/PatientEditorController.java View File

@@ -9,6 +9,7 @@ import javafx.scene.control.ComboBox;
import javafx.scene.control.DatePicker; import javafx.scene.control.DatePicker;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import javafx.scene.control.TextArea; import javafx.scene.control.TextArea;
import javafx.event.ActionEvent;
import javafx.scene.control.TextField; import javafx.scene.control.TextField;


public class PatientEditorController { public class PatientEditorController {


+ 7
- 0
src/main/java/de/uniluebeck/mi/projmi6/controller/StationsHistorieController.java View File

@@ -0,0 +1,7 @@
package de.uniluebeck.mi.projmi6.controller;

/**
* Created by 631806 on 12.11.15.
*/
public class StationsHistorieController {
}

+ 1
- 1
src/main/resources/diagnose.fxml View File

@@ -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>


+ 1
- 1
src/main/resources/fall.fxml View File

@@ -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>


+ 1
- 1
src/main/resources/main.fxml View File

@@ -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>


+ 1
- 1
src/main/resources/patient_edit.fxml View File

@@ -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>


+ 1
- 1
src/main/resources/patient_tables.fxml View File

@@ -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>


+ 1
- 1
src/main/resources/settings.fxml View File

@@ -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">


+ 1
- 1
src/main/resources/stationshistorie.fxml View File

@@ -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>


+ 1
- 1
src/main/resources/untersuchungen.fxml View File

@@ -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>


Loading…
Cancel
Save