|
|
|
@ -177,11 +177,12 @@ public class FlightSummaryController extends Controller {
|
|
|
|
* Used to load the page from the MenuController.
|
|
|
|
* Used to load the page from the MenuController.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public void load() {
|
|
|
|
public void load() {
|
|
|
|
|
|
|
|
if (theDataSet != null) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
theDataSet = getParent().getCurrentDataset();
|
|
|
|
theDataSet = getParent().getCurrentDataset();
|
|
|
|
ArrayList<FlightPath> flightPaths;
|
|
|
|
ArrayList<FlightPath> flightPaths;
|
|
|
|
flightPaths = theDataSet.getFlightPaths();
|
|
|
|
flightPaths = theDataSet.getFlightPaths();
|
|
|
|
for(int i = 0; i<flightPaths.size(); i++ ){
|
|
|
|
for (int i = 0; i < flightPaths.size(); i++) {
|
|
|
|
int pathID = flightPaths.get(i).getID();
|
|
|
|
int pathID = flightPaths.get(i).getID();
|
|
|
|
String pathSource = flightPaths.get(i).departsFrom();
|
|
|
|
String pathSource = flightPaths.get(i).departsFrom();
|
|
|
|
String pathDestin = flightPaths.get(i).arrivesAt();
|
|
|
|
String pathDestin = flightPaths.get(i).arrivesAt();
|
|
|
|
@ -190,13 +191,12 @@ public class FlightSummaryController extends Controller {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
flightPathListView.setItems(flightList);
|
|
|
|
flightPathListView.setItems(flightList);
|
|
|
|
flightSummaryListView();
|
|
|
|
flightSummaryListView();
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (theDataSet.getFlightPaths().size() > 0){
|
|
|
|
if (theDataSet.getFlightPaths().size() > 0) {
|
|
|
|
map = new Map(mapView, theDataSet.getFlightPaths().get(0).getRoutePath());
|
|
|
|
map = new Map(mapView, theDataSet.getFlightPaths().get(0).getRoutePath());
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
map = new Map(mapView, new RoutePath());
|
|
|
|
map = new Map(mapView, new RoutePath());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
flightPathListView.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<String>() {
|
|
|
|
flightPathListView.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<String>() {
|
|
|
|
@ -208,6 +208,7 @@ public class FlightSummaryController extends Controller {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Removes the selected path from the list view of paths and from the database.
|
|
|
|
* Removes the selected path from the list view of paths and from the database.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|