Fixed a few bugs and refactored some code.
This commit is contained in:
@@ -143,38 +143,6 @@ public class FlightRDController extends Controller {
|
||||
/**
|
||||
* Will take the inputs from the text fields and adds the point to the current flight path.
|
||||
*/
|
||||
// public void addFlightPoint() {
|
||||
//
|
||||
// try {
|
||||
// theDataSet.addFlightPointToPath(currentPathId,
|
||||
// flightNameBox.getText(),
|
||||
// flightTypeBox.getText(),
|
||||
// flightViaBox.getText(),
|
||||
// flightAltitudeBox.getText(),
|
||||
// flightLatitudeBox.getText(),
|
||||
// flightLongitudeBox.getText(),
|
||||
// flightHeadingBox.getText(),
|
||||
// flightLegDistBox.getText(),
|
||||
// flightTotDistBox.getText());
|
||||
// flightNameBox.clear();
|
||||
// flightTypeBox.clear();
|
||||
// flightViaBox.clear();
|
||||
// flightAltitudeBox.clear();
|
||||
// flightLatitudeBox.clear();
|
||||
// flightLongitudeBox.clear();
|
||||
// flightHeadingBox.clear();
|
||||
// flightLegDistBox.clear();
|
||||
// flightTotDistBox.clear();
|
||||
//
|
||||
// updateTable(currentPathIndex);
|
||||
// } catch ( Exception e ) {
|
||||
// Alert alert = new Alert(Alert.AlertType.ERROR);
|
||||
// alert.setTitle("Flight Point Data Error");
|
||||
// alert.setHeaderText("Error adding a custom flight point entry.");
|
||||
// alert.setContentText(e.getMessage());
|
||||
// }
|
||||
// }
|
||||
|
||||
public void openAdd() {
|
||||
Session session = getParent().getSession();
|
||||
session.setCurrentFlightPathtID(currentPathId);
|
||||
|
||||
@@ -37,8 +37,6 @@ public class FlightSummaryController extends Controller {
|
||||
private int currentPathId = 0;
|
||||
private int currentPathIndex = 0;
|
||||
|
||||
@FXML
|
||||
private Button flightRawData;
|
||||
private Map map;
|
||||
@FXML
|
||||
private WebView mapView;
|
||||
@@ -96,12 +94,8 @@ public class FlightSummaryController extends Controller {
|
||||
Airport sourceAirport = null;
|
||||
Airport destinationAirport = null;
|
||||
|
||||
System.out.println(firstPointICAO);
|
||||
System.out.println(lastPointICAO);
|
||||
|
||||
for (int i=0; i < airportList.size(); i++){
|
||||
Airport current = airportList.get(i);
|
||||
System.out.println(current.getICAO());
|
||||
if(current.getICAO().equals(firstPointICAO)){
|
||||
sourceAirport = current;
|
||||
}
|
||||
@@ -137,7 +131,6 @@ public class FlightSummaryController extends Controller {
|
||||
infoList.add("ICAO codes not being present in the Airline");
|
||||
infoList.add("Database!");
|
||||
}
|
||||
|
||||
flightSummaryListView.setItems(infoList);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -175,6 +168,7 @@ public class FlightSummaryController extends Controller {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to load the page from the MenuController.
|
||||
*/
|
||||
@@ -210,6 +204,7 @@ public class FlightSummaryController extends Controller {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the selected path from the list view of paths and from the database.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user