package seng202.group9.GUI; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.Button; import javafx.scene.control.ListView; import seng202.group9.Controller.App; import seng202.group9.Controller.Dataset; import seng202.group9.Core.FlightPath; import java.net.URL; import java.util.ArrayList; import java.util.ResourceBundle; /** * Controller for the Flights Summary Scene. * Created by Liam Beckett on 13/09/2016. */ public class FlightSummaryController implements Initializable { private Dataset theDataSet = null; App parent; public void setApp(App parent){ this.parent = parent; } @FXML private Button flightRawData; @FXML ListView flightPathListView; final ObservableList flightList = FXCollections.observableArrayList(); /** * Loads the Flight paths into the List View and is called from the MenuController. */ public void flightPathListView() { try { theDataSet = this.parent.getCurrentDataset(); ArrayList flightPaths = new ArrayList(); flightPaths = theDataSet.getFlightPaths(); for(int i = 0; i