| @@ -27,6 +27,10 @@ import javafx.stage.StageStyle; | |||||
| public class Main extends Application { | public class Main extends Application { | ||||
| public static String OPS_IP = "127.0.0.1"; | |||||
| public static int OPS_PORT = 1112; | |||||
| private HL7Server server; | private HL7Server server; | ||||
| /** | /** | ||||
| @@ -4,7 +4,9 @@ package de.uniluebeck.mi.projmi6.controller; | |||||
| * Created by 626947 on 12.11.15. | * Created by 626947 on 12.11.15. | ||||
| */ | */ | ||||
| import de.uniluebeck.mi.projmi6.Main; | |||||
| import javafx.fxml.FXML; | import javafx.fxml.FXML; | ||||
| import javafx.scene.control.Alert; | |||||
| import javafx.scene.control.Button; | import javafx.scene.control.Button; | ||||
| import javafx.scene.control.TextField; | import javafx.scene.control.TextField; | ||||
| @@ -14,25 +16,50 @@ public class SettingsController { | |||||
| public SettingsController (MainController mainController){ | public SettingsController (MainController mainController){ | ||||
| this.mainController = mainController; | this.mainController = mainController; | ||||
| } | } | ||||
| @FXML | |||||
| private Button opsServerSave; | |||||
| private void initialize(){ | |||||
| opsServerIp.setText(Main.OPS_IP); | |||||
| opsServerPort.setText(Integer.toString(Main.OPS_PORT)); | |||||
| @FXML | |||||
| private Button opsServerSave1; | |||||
| } | |||||
| private void showMessage(String title, String message) { | |||||
| Alert alert = new Alert(Alert.AlertType.INFORMATION); | |||||
| alert.setTitle("Ung\u00fcltige Daten!"); | |||||
| alert.setHeaderText(title); | |||||
| alert.setContentText(message); | |||||
| alert.showAndWait(); | |||||
| } | |||||
| private boolean validateData(String server, String portStr){ | |||||
| int port = -1; | |||||
| try{ | |||||
| port = Integer.parseInt(portStr); | |||||
| }catch (Exception e){ | |||||
| showMessage("Portnummer ist nicht valide", "Die Portnummer muss eine Zahl zwischen 1024 und 65535 sein!"); | |||||
| return false; | |||||
| } | |||||
| if(!(port >= 1024 && port <= 65535)){ | |||||
| showMessage("Portnummer ist nicht valide", "Die Portnummer muss eine Zahl zwischen 1024 und 65535 sein!"); | |||||
| return false; | |||||
| } | |||||
| return true; | |||||
| } | |||||
| @FXML | @FXML | ||||
| private TextField opsServerIp1; | |||||
| private Button opsServerSave; | |||||
| @FXML | @FXML | ||||
| private TextField opsServerIp; | private TextField opsServerIp; | ||||
| @FXML | @FXML | ||||
| private TextField opsServerCode; | |||||
| private TextField opsServerPort; | |||||
| @FXML | |||||
| private TextField opsServerCode1; | |||||
| } | } | ||||
| @@ -111,8 +111,8 @@ public class StationsHistorieController { | |||||
| } | } | ||||
| private void initButtons(){ | private void initButtons(){ | ||||
| btnStatHistCancel.visibleProperty().bind(state.isEqualTo(State.VIEW).and(tblStationsHistorie.getSelectionModel().selectedItemProperty().isNotNull())); | |||||
| btnStatHistCancel.managedProperty().bind(btnStatHistCancel.visibleProperty()); | |||||
| // btnStatHistCancel.visibleProperty().bind(state.isEqualTo(State.VIEW).and(tblStationsHistorie.getSelectionModel().selectedItemProperty().isNotNull())); | |||||
| // btnStatHistCancel.managedProperty().bind(btnStatHistCancel.visibleProperty()); | |||||
| btnStatHistSave.visibleProperty().bind(state.isEqualTo(State.VIEW).not()); | btnStatHistSave.visibleProperty().bind(state.isEqualTo(State.VIEW).not()); | ||||
| btnStatHistSave.managedProperty().bind(btnStatHistSave.visibleProperty()); | btnStatHistSave.managedProperty().bind(btnStatHistSave.visibleProperty()); | ||||
| @@ -18,7 +18,7 @@ | |||||
| <TableView fx:id="tblLog" VBox.vgrow="ALWAYS"> | <TableView fx:id="tblLog" VBox.vgrow="ALWAYS"> | ||||
| <columns> | <columns> | ||||
| <TableColumn fx:id="colLogDirection" editable="false" maxWidth="50.0" minWidth="75.0" text="Richtung" /> | <TableColumn fx:id="colLogDirection" editable="false" maxWidth="50.0" minWidth="75.0" text="Richtung" /> | ||||
| <TableColumn fx:id="colLogIp" editable="false" maxWidth="200.0" minWidth="150.0" text="Ursprungs-IP" /> | |||||
| <TableColumn fx:id="colLogIp" editable="false" maxWidth="200.0" minWidth="150.0" text="Source / Destination" /> | |||||
| <TableColumn fx:id="colLogTime" editable="false" maxWidth="200.0" minWidth="150.0" text="Uhrzeit" /> | <TableColumn fx:id="colLogTime" editable="false" maxWidth="200.0" minWidth="150.0" text="Uhrzeit" /> | ||||
| <TableColumn fx:id="colLogMessage" editable="false" prefWidth="75.0" text="Nachricht" /> | <TableColumn fx:id="colLogMessage" editable="false" prefWidth="75.0" text="Nachricht" /> | ||||
| </columns> | </columns> | ||||
| @@ -1,16 +1,17 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||
| <?import javafx.scene.paint.*?> | |||||
| <?import java.net.*?> | |||||
| <?import java.lang.*?> | <?import java.lang.*?> | ||||
| <?import javafx.geometry.*?> | <?import javafx.geometry.*?> | ||||
| <?import javafx.scene.control.*?> | <?import javafx.scene.control.*?> | ||||
| <?import javafx.scene.layout.*?> | <?import javafx.scene.layout.*?> | ||||
| <?import javafx.scene.text.*?> | <?import javafx.scene.text.*?> | ||||
| <?import java.net.URL?> | <?import java.net.URL?> | ||||
| <TilePane prefHeight="240.0" prefWidth="702.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.uniluebeck.mi.projmi6.controller.SettingsController"> | <TilePane prefHeight="240.0" prefWidth="702.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.uniluebeck.mi.projmi6.controller.SettingsController"> | ||||
| <children> | <children> | ||||
| <VBox prefHeight="200.0" prefWidth="300.0" style="-fx-background-color: white; -fx-background-radius: 10;" styleClass="settings-box"> | |||||
| <!-- <VBox prefHeight="200.0" prefWidth="300.0" style="-fx-background-color: white; -fx-background-radius: 10;" styleClass="settings-box"> | |||||
| <children> | <children> | ||||
| <Text strokeType="OUTSIDE" strokeWidth="0.0" text="MySQL-Datenbank"> | <Text strokeType="OUTSIDE" strokeWidth="0.0" text="MySQL-Datenbank"> | ||||
| <font> | <font> | ||||
| @@ -52,7 +53,7 @@ | |||||
| <TilePane.margin> | <TilePane.margin> | ||||
| <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" /> | <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" /> | ||||
| </TilePane.margin> | </TilePane.margin> | ||||
| </VBox> | |||||
| </VBox> --> | |||||
| <VBox prefHeight="200.0" prefWidth="300.0" style="-fx-background-color: white; -fx-background-radius: 10;" styleClass="settings-box"> | <VBox prefHeight="200.0" prefWidth="300.0" style="-fx-background-color: white; -fx-background-radius: 10;" styleClass="settings-box"> | ||||
| <children> | <children> | ||||
| <Text strokeType="OUTSIDE" strokeWidth="0.0" text="OPS-Server"> | <Text strokeType="OUTSIDE" strokeWidth="0.0" text="OPS-Server"> | ||||
| @@ -77,7 +78,7 @@ | |||||
| <Label text="Port:" GridPane.rowIndex="1" /> | <Label text="Port:" GridPane.rowIndex="1" /> | ||||
| <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Text" GridPane.columnIndex="1" /> | <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Text" GridPane.columnIndex="1" /> | ||||
| <TextField fx:id="opsServerIp" GridPane.columnIndex="1" /> | <TextField fx:id="opsServerIp" GridPane.columnIndex="1" /> | ||||
| <TextField fx:id="opsServerCode" GridPane.columnIndex="1" GridPane.rowIndex="1" /> | |||||
| <TextField fx:id="opsServerPort" GridPane.columnIndex="1" GridPane.rowIndex="1" /> | |||||
| </children> | </children> | ||||
| </GridPane> | </GridPane> | ||||
| <HBox alignment="BOTTOM_RIGHT" VBox.vgrow="ALWAYS"> | <HBox alignment="BOTTOM_RIGHT" VBox.vgrow="ALWAYS"> | ||||
| @@ -93,6 +94,42 @@ | |||||
| <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> | <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> | ||||
| </padding> | </padding> | ||||
| </VBox> | </VBox> | ||||
| <VBox prefHeight="200.0" prefWidth="300.0" style="-fx-background-color: white; -fx-background-radius: 10;" styleClass="settings-box"> | |||||
| <children> | |||||
| <Text strokeType="OUTSIDE" strokeWidth="0.0" text="KIS Gruppe 6"> | |||||
| <font> | |||||
| <Font size="18.0" /> | |||||
| </font> | |||||
| <VBox.margin> | |||||
| <Insets bottom="10.0" /> | |||||
| </VBox.margin> | |||||
| </Text> | |||||
| <Label text="Eine Projeketarbeit von:"> | |||||
| <VBox.margin> | |||||
| <Insets bottom="6.0" /> | |||||
| </VBox.margin> | |||||
| </Label> | |||||
| <Label text=" - Ileana Krontsi" /> | |||||
| <Label layoutX="20.0" layoutY="71.0" text=" - Natascha Koch" /> | |||||
| <Label layoutX="20.0" layoutY="88.0" text=" - Johannes Oehm" /> | |||||
| <Label layoutX="20.0" layoutY="105.0" text=" - Nils Dittberner" /> | |||||
| <Label text="Projektpraktikum Medizinische Informatik"> | |||||
| <VBox.margin> | |||||
| <Insets top="10.0" /> | |||||
| </VBox.margin> | |||||
| </Label> | |||||
| <Label layoutX="20.0" layoutY="155.0" text="Wintersemester 2015/16" textFill="#777777" /> | |||||
| <Label layoutX="20.0" layoutY="172.0" text="Universität zu Lübeck" textFill="#777777" /> | |||||
| </children> | |||||
| <padding> | |||||
| <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> | |||||
| </padding> | |||||
| <TilePane.margin> | |||||
| <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" /> | |||||
| </TilePane.margin> | |||||
| </VBox> | |||||
| </children> | </children> | ||||
| <stylesheets> | <stylesheets> | ||||
| <URL value="@style.css" /> | <URL value="@style.css" /> | ||||
| @@ -64,7 +64,7 @@ | |||||
| <Button mnemonicParsing="false" text="Abbrechen" onAction="#clickedAbort" fx:id="btnStatHistAbort"/> | <Button mnemonicParsing="false" text="Abbrechen" onAction="#clickedAbort" fx:id="btnStatHistAbort"/> | ||||
| <Button mnemonicParsing="false" text="Speichern" onAction="#clickedSave" fx:id="btnStatHistSave"/> | <Button mnemonicParsing="false" text="Speichern" onAction="#clickedSave" fx:id="btnStatHistSave"/> | ||||
| <Button mnemonicParsing="false" text="Entfernen" onAction="#clickedDelete" fx:id="btnStatHistDelete"/> | <Button mnemonicParsing="false" text="Entfernen" onAction="#clickedDelete" fx:id="btnStatHistDelete"/> | ||||
| <Button disable="true" mnemonicParsing="false" text="Eintrag entfernen" fx:id="btnStatHistCancel" onAction="#clickedCancel"/> | |||||
| <!-- <Button disable="true" mnemonicParsing="false" text="Eintrag entfernen" fx:id="btnStatHistCancel" onAction="#clickedCancel"/> --> | |||||
| </children> | </children> | ||||
| </HBox> | </HBox> | ||||
| <GridPane> | <GridPane> | ||||