diff options
author | Viktoria Pundy <viktoria.pundy@aon.at> | 2018-05-17 16:24:24 +0200 |
---|---|---|
committer | Tharre <tharre3@gmail.com> | 2018-05-22 15:53:23 +0200 |
commit | 81996499f2536ce0c5e4d4a128df73753a14f65c (patch) | |
tree | a939ca181e420499790f7b128274cd20555f1e3b /src | |
parent | 56bb347936509de408df2f3959b71d882362d337 (diff) | |
download | sepm-groupproject-81996499f2536ce0c5e4d4a128df73753a14f65c.tar.gz sepm-groupproject-81996499f2536ce0c5e4d4a128df73753a14f65c.tar.xz sepm-groupproject-81996499f2536ce0c5e4d4a128df73753a14f65c.zip |
Vehicles are now shown in detail view [#24990]
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/userInterface/ArchivOperationController.java | 13 | ||||
-rw-r--r-- | src/main/resources/fxml/ArchivOperation.fxml | 9 |
2 files changed, 17 insertions, 5 deletions
diff --git a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/userInterface/ArchivOperationController.java b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/userInterface/ArchivOperationController.java index 177dd4d..c22b398 100644 --- a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/userInterface/ArchivOperationController.java +++ b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/userInterface/ArchivOperationController.java @@ -2,12 +2,14 @@ package at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.userInterface; import at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.dto.Operation; import at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.dto.Operation.Status; +import at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.dto.Vehicle; import at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.service.OperationService; import at.ac.tuwien.sepm.assignment.groupphase.exception.ServiceException; import java.time.LocalDateTime; import java.time.ZoneOffset; import java.util.EnumSet; import java.util.LinkedList; +import java.util.List; import javafx.scene.control.Alert; import javafx.scene.control.Alert.AlertType; import javafx.scene.control.Button; @@ -27,6 +29,7 @@ public class ArchivOperationController { public Label lblVehicles; public Label lblDate; public Label lblAddress; + public FlowPane fpVehicles; OperationService operationService; public FlowPane archiveOperationFlowPane; public CreateOperationController createOperationController; @@ -107,6 +110,15 @@ public class ArchivOperationController { } lblVehicles.setText(result.toString()); lblAddress.setText(detailOperation.destination()); + + List<Vehicle> vehicles = detailOperation.vehicles(); + for (int i = 0; i < vehicles.size(); i++) { + Button b = new Button(); + b.setPrefHeight(200); + b.setPrefWidth(640 / 2); + b.setText(vehicles.get(i).name()); + fpVehicles.getChildren().add(b); + } } public void setListVisible(boolean b) { @@ -119,6 +131,5 @@ public class ArchivOperationController { public void backClicked() { setDetailsVisible(false); - // setListVisible(true); } } diff --git a/src/main/resources/fxml/ArchivOperation.fxml b/src/main/resources/fxml/ArchivOperation.fxml index 991cafe..29313af 100644 --- a/src/main/resources/fxml/ArchivOperation.fxml +++ b/src/main/resources/fxml/ArchivOperation.fxml @@ -24,25 +24,25 @@ <Font name="System Bold" size="16.0" /> </font> </Label> - <Hyperlink fx:id="hypBack" onAction="#backClicked" layoutX="656.0" layoutY="20.0" text="Zurück" textFill="WHITE"> + <Hyperlink fx:id="hypBack" layoutX="656.0" layoutY="20.0" onAction="#backClicked" text="Zurück" textFill="WHITE"> <font> <Font name="System Bold" size="16.0" /> </font> </Hyperlink> </children></AnchorPane> - <AnchorPane layoutX="82.0" layoutY="60.0" prefHeight="150.0" prefWidth="636.0" style="-fx-background-color: white;"> + <AnchorPane layoutX="82.0" layoutY="60.0" prefHeight="150.0" prefWidth="636.0" style="-fx-background-color: white; -fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.8), 5, 0, 0, 5);"> <children> <Label fx:id="lblOpCode" layoutX="25.0" layoutY="22.0" prefHeight="26.0" prefWidth="116.0" text="Label"> <font> <Font name="System Bold" size="18.0" /> </font> </Label> - <Label fx:id="lblAddress" layoutX="26.0" layoutY="53.0" prefHeight="22.0" prefWidth="540.0" text="Label"> + <Label fx:id="lblAddress" layoutX="26.0" layoutY="53.0" prefHeight="22.0" prefWidth="540.0" style="-fx-effect: dropshadow;" text="Label"> <font> <Font size="15.0" /> </font> </Label> - <Label fx:id="lblVehicles" layoutX="58.0" layoutY="91.0" prefHeight="46.0" prefWidth="554.0" text="Label"> + <Label fx:id="lblVehicles" layoutX="58.0" layoutY="91.0" prefHeight="46.0" prefWidth="554.0" style="-fx-effect: drop;" text="Label"> <font> <Font size="15.0" /> </font> @@ -54,6 +54,7 @@ </Label> </children> </AnchorPane> + <FlowPane fx:id="fpVehicles" layoutX="82.0" layoutY="225.0" prefHeight="410.0" prefWidth="640.0" /> </children> </AnchorPane> </children> |