mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
- Race Finish Dialog showing up, unsure if its actually showing the correct ordering or not.
tags : #story[1245]
This commit is contained in:
@@ -3,11 +3,13 @@ package seng302.visualiser.controllers.dialogs;
|
||||
|
||||
import com.jfoenix.controls.JFXButton;
|
||||
import com.jfoenix.controls.JFXListView;
|
||||
import java.awt.Label;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.ResourceBundle;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.control.Label;
|
||||
import seng302.model.ClientYacht;
|
||||
import seng302.visualiser.controllers.ViewManager;
|
||||
|
||||
public class FinishDialogController implements Initializable {
|
||||
@@ -16,7 +18,7 @@ public class FinishDialogController implements Initializable {
|
||||
@FXML
|
||||
private Label raceFinishLabel;
|
||||
@FXML
|
||||
private JFXListView finishersList;
|
||||
private JFXListView<Label> finishersList;
|
||||
@FXML
|
||||
private JFXButton playAgain;
|
||||
//---------FXML END---------//
|
||||
@@ -25,4 +27,11 @@ public class FinishDialogController implements Initializable {
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
playAgain.setOnAction(event -> ViewManager.getInstance().goToStartView());
|
||||
}
|
||||
|
||||
public void setFinishedBoats(ArrayList<ClientYacht> finishedBoats) {
|
||||
finishersList.getItems().clear();
|
||||
for (ClientYacht yacht : finishedBoats) {
|
||||
finishersList.getItems().add(new Label(yacht.getBoatName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user