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.
|
||||
*/
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.text.*?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import java.lang.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.RowConstraints?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="568.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.GettingStartedController">
|
||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="568.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.GettingStartedController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="160.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="160.0" />
|
||||
@@ -40,37 +43,23 @@
|
||||
<Insets bottom="15.0" />
|
||||
</GridPane.margin>
|
||||
</Button>
|
||||
<Label text="Welcome!" GridPane.columnSpan="5" GridPane.halignment="CENTER">
|
||||
<Label alignment="TOP_CENTER" text="Welcome!" GridPane.columnSpan="5" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
|
||||
<font>
|
||||
<Font size="36.0" />
|
||||
</font>
|
||||
<GridPane.margin>
|
||||
<Insets left="15.0" />
|
||||
<Insets />
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
<Label prefHeight="31.0" prefWidth="489.0" text="To get started, select which type of data you" GridPane.columnIndex="1" GridPane.columnSpan="3" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="TOP">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||
</GridPane.margin>
|
||||
<font>
|
||||
<Font size="20.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Button mnemonicParsing="false" onAction="#goToAirlineSummary" text="Blank Dataset" GridPane.columnIndex="4" GridPane.halignment="CENTER" GridPane.rowIndex="2">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="15.0" />
|
||||
</GridPane.margin>
|
||||
</Button>
|
||||
<Label layoutX="185.0" layoutY="427.0" prefHeight="31.0" prefWidth="489.0" text="wish to import or start from a blank dataset." GridPane.columnIndex="1" GridPane.columnSpan="3" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER">
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="To get started, select which type of data you wish to import or start from a blank dataset." textAlignment="CENTER" wrappingWidth="480.84765625" GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||
<font>
|
||||
<Font size="20.0" />
|
||||
</font>
|
||||
<GridPane.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" />
|
||||
</GridPane.margin>
|
||||
<padding>
|
||||
<Insets top="15.0" />
|
||||
</padding>
|
||||
</Label>
|
||||
</Text>
|
||||
</children>
|
||||
</GridPane>
|
||||
|
||||
Reference in New Issue
Block a user