mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
02df69b7b4
Tags: #story[1245]
39 lines
1.2 KiB
Java
39 lines
1.2 KiB
Java
package seng302.visualiser.controllers.dialogs;
|
|
|
|
|
|
import com.jfoenix.controls.JFXButton;
|
|
import com.jfoenix.controls.JFXListView;
|
|
import java.net.URL;
|
|
import java.util.ArrayList;
|
|
import java.util.Comparator;
|
|
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 {
|
|
|
|
//--------FXML BEGIN--------//
|
|
@FXML
|
|
private Label raceFinishLabel;
|
|
@FXML
|
|
private JFXListView<Label> finishersList;
|
|
@FXML
|
|
private JFXButton playAgain;
|
|
//---------FXML END---------//
|
|
|
|
@Override
|
|
public void initialize(URL location, ResourceBundle resources) {
|
|
playAgain.setOnAction(event -> ViewManager.getInstance().goToStartView());
|
|
}
|
|
|
|
public void setFinishedBoats(ArrayList<ClientYacht> finishedBoats) {
|
|
finishersList.getItems().clear();
|
|
for (int i = 0; i < finishedBoats.size(); i++) {
|
|
finishersList.getItems().add(new Label(Integer.toString(i+1) +". " + finishedBoats.get(i).getBoatName()));
|
|
}
|
|
}
|
|
}
|