| @@ -33,14 +33,12 @@ public class LogController { | |||||
| public LogController(MainController mainController) { | public LogController(MainController mainController) { | ||||
| this.mainController = mainController; | this.mainController = mainController; | ||||
| } | } | ||||
| @FXML | @FXML | ||||
| private void initialize(){ | private void initialize(){ | ||||
| initColumns(); | initColumns(); | ||||
| refreshLogFromDb(); | refreshLogFromDb(); | ||||
| } | } | ||||
| private void initColumns(){ | private void initColumns(){ | ||||
| @@ -95,5 +93,11 @@ public class LogController { | |||||
| } | } | ||||
| private void clickedRefresh(){ | |||||
| refreshLogFromDb(); | |||||
| } | |||||
| } | } | ||||
| @@ -236,7 +236,9 @@ public class MainController { | |||||
| } | } | ||||
| setText(item.toString()); | setText(item.toString()); | ||||
| if (item.getStorniert()) { | if (item.getStorniert()) { | ||||
| setGraphic(new Label("<storniert> ")); | |||||
| Text text = new Text("<storniert> "); | |||||
| text.setFill(Color.RED); | |||||
| setGraphic(text); | |||||
| setTextFill(Color.GRAY); //TODO | setTextFill(Color.GRAY); //TODO | ||||
| } else { | } else { | ||||
| setTextFill(Color.BLACK); | setTextFill(Color.BLACK); | ||||
| @@ -201,9 +201,9 @@ public class StationsHistorieController { | |||||
| if(!LocalDateTime.now().isBefore(selectedItem.getAufnahmeDatum())){ | if(!LocalDateTime.now().isBefore(selectedItem.getAufnahmeDatum())){ | ||||
| Alert alert = new Alert(Alert.AlertType.WARNING); | Alert alert = new Alert(Alert.AlertType.WARNING); | ||||
| alert.setTitle("Information Dialog"); | |||||
| alert.setTitle("Stationsaufenthalt kann nicht entfernt werden!"); | |||||
| alert.setHeaderText(null); | alert.setHeaderText(null); | ||||
| alert.setContentText("I have a great message for you!"); | |||||
| alert.setContentText("Der Aufenthalt muss in der Zukunft liegen, um gel\u00f6scht werden zu k\u00f6nnen!"); | |||||
| alert.initOwner(btnStatHistCancel.getScene().getWindow()); | alert.initOwner(btnStatHistCancel.getScene().getWindow()); | ||||
| alert.initModality(Modality.APPLICATION_MODAL); | alert.initModality(Modality.APPLICATION_MODAL); | ||||
| alert.showAndWait(); | alert.showAndWait(); | ||||
| @@ -8,6 +8,12 @@ | |||||
| <?import java.net.URL?> | <?import java.net.URL?> | ||||
| <VBox minHeight="-Infinity" minWidth="-Infinity" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.uniluebeck.mi.projmi6.controller.LogController"> | <VBox minHeight="-Infinity" minWidth="-Infinity" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.uniluebeck.mi.projmi6.controller.LogController"> | ||||
| <children> | <children> | ||||
| <ToolBar prefHeight="40.0" prefWidth="200.0"> | |||||
| <items> | |||||
| <Pane HBox.hgrow="ALWAYS" /> | |||||
| <Button fx:id="btnRefresh" text="Liste aktualisieren" onAction="#clickedRefresh"/> | |||||
| </items> | |||||
| </ToolBar> | |||||
| <TableView fx:id="tblLog" VBox.vgrow="ALWAYS"> | <TableView fx:id="tblLog" VBox.vgrow="ALWAYS"> | ||||
| <columns> | <columns> | ||||
| <TableColumn fx:id="colLogIp" editable="false" prefWidth="75.0" text="Ursprungs-IP" /> | <TableColumn fx:id="colLogIp" editable="false" prefWidth="75.0" text="Ursprungs-IP" /> | ||||