Made the Dataset chooser not mess with the menu and fixed merge problems

main
YaFedImYaEatIm 9 years ago
commit e0d074af19

Binary file not shown.

@ -17,6 +17,7 @@ import javafx.scene.control.Menu;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.VBox;
import javafx.stage.Modality;
import javafx.stage.Stage;
import seng202.group9.Core.FlightPath;
import seng202.group9.GUI.*;
@ -50,6 +51,23 @@ public class App extends Application
@Override
public void start(Stage primaryStage) {
this.primaryStage = primaryStage;
//after all loading then load the previous session
try{
FileInputStream fileIn = new FileInputStream("res/session.ser");
ObjectInputStream objectIn = new ObjectInputStream(fileIn);
session = (Session) objectIn.readObject();
objectIn.close();
fileIn.close();
}catch(IOException e){
session = new Session();
System.out.println("New Session File Created");
}catch(ClassNotFoundException e){
System.out.println("Missing Session Class");
System.exit(1);
} catch (Exception e) {
session = new Session();
e.printStackTrace();
}
//load the menu and the first container
try {
FXMLLoader loader = new FXMLLoader();
@ -72,40 +90,25 @@ public class App extends Application
} catch (Exception e){
e.printStackTrace();
}
//after all loading then load the previous session
try{
FileInputStream fileIn = new FileInputStream("res/session.ser");
ObjectInputStream objectIn = new ObjectInputStream(fileIn);
session = (Session) objectIn.readObject();
Controller controller = (Controller) replaceSceneContent(session.getSceneDisplayed());
controller.setApp(this);
controller.load();
controller.loadOnce();
objectIn.close();
fileIn.close();
}catch(IOException e){
session = new Session();
System.out.println("New Session File Created");
}catch(ClassNotFoundException e){
System.out.println("Missing Session Class");
System.exit(1);
} catch (Exception e) {
session = new Session();
e.printStackTrace();
}
//testing out dataset
try {
if (session.getCurrentDataset() != null) {
currentDataset = new Dataset(session.getCurrentDataset(), Dataset.getExisting);
}else{
menuController.createPopUpStage(SceneCode.DATASET_CONTROLLER, 600, 400);
createPopUpStage(SceneCode.DATASET_CONTROLLER, 600, 400);
}
}catch (DataException e){
menuController.createPopUpStage(SceneCode.DATASET_CONTROLLER, 600, 400);
createPopUpStage(SceneCode.DATASET_CONTROLLER, 600, 400);
}catch (NullPointerException e){
menuController.createPopUpStage(SceneCode.DATASET_CONTROLLER, 600, 400);
createPopUpStage(SceneCode.DATASET_CONTROLLER, 600, 400);
}catch (Exception e){
menuController.createPopUpStage(SceneCode.DATASET_CONTROLLER, 600, 400);
createPopUpStage(SceneCode.DATASET_CONTROLLER, 600, 400);
}
//after all loading then load the previous session
if (session.getSceneDisplayed() != null) {
menuController.replaceSceneContent(session.getSceneDisplayed());
}else{
menuController.replaceSceneContent(SceneCode.INITIAL);
}
}
@ -251,4 +254,37 @@ public class App extends Application
}
}
}
public Stage createPopUpStage(SceneCode scene, int width, int height) {
FXMLLoader loader = new FXMLLoader();
InputStream in = getClass().getClassLoader().getResourceAsStream(scene.getFilePath());
Parent page = null;
try {
page = loader.load(in);
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
in.close();
} catch (IOException e) {
e.printStackTrace();
}
}
//set contorller and call default calls
Controller controller = (Controller) loader.getController();
controller.setApp(this);
controller.load();
controller.loadOnce();
//create a new stage to popup
Stage popupStage = new Stage();
popupStage.initModality(Modality.WINDOW_MODAL);
//inner layout constraints
VBox container = new VBox();
container.getChildren().add(page);
Scene popupScene = new Scene(container, width, height);
//show
popupStage.setScene(popupScene);
popupStage.showAndWait();
return popupStage;
}
}

@ -5,14 +5,14 @@ package seng202.group9.Controller;
* SceneCode enum is used for Serialization of sessions as well as changing the GUI state from one to the other.
*/
public enum SceneCode {
INITIAL(""), AIRLINE_SUMMARY("airline_summary.fxml"), AIRLINE_RAW_DATA("airline_raw_data.fxml"),
INITIAL("getting_started.fxml"), AIRLINE_SUMMARY("airline_summary.fxml"), AIRLINE_RAW_DATA("airline_raw_data.fxml"),
AIRPORT_SUMMARY("airport_summary.fxml"), AIRPORT_RAW_DATA("airport_raw_data.fxml"),
ROUTE_SUMMARY("routes_summary.fxml"), ROUTE_RAW_DATA("route_raw_data.fxml"), FLIGHT_SUMMARY("flight_data_summary.fxml"),
FLIGHT_RAW_DATA("flight_raw_data.fxml"), AIRPORT_ANALYSER("airport_analyser.fxml"), ROUTE_ANALYSER("route_analyser.fxml"),
AIRPORT_DIST_CALC("airport_dist_calc.fxml"), AIRLINE_ADD("airline_add_form.fxml"), AIRLINE_FILTER("airline_filter_form.fxml"),
AIRPORT_ADD("airport_add_form.fxml"), AIRPORT_FILTER("airport_filter_form.fxml"), ROUTE_ADD("route_add_form.fxml"),
ROUTE_FILTER("route_filter_form.fxml"), AIRLINE_EDIT("airline_edit_form.fxml"), AIRPORT_EDIT("airport_edit_form.fxml"),
ROUTE_EDIT("route_edit_form.fxml"), FLIGHT_EDITOR("flight_editor_form.fxml"), DATASET_CONTROLLER("dataset_editor.fxml");
ROUTE_EDIT("route_edit_form.fxml"), FLIGHT_EDITOR("flight_editor_form.fxml"), DATASET_CONTROLLER("dataset_editor.fxml"), HELP("help.fxml");
private String filePath;

@ -69,7 +69,6 @@ public class FlightEditorController extends Controller{
stage.close();
} catch ( Exception e ) {
e.printStackTrace();
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Flight Data Error");
alert.setHeaderText("Error editing a flight point.");

@ -13,8 +13,10 @@ import javafx.scene.control.ListView;
import javafx.scene.input.MouseEvent;
import javafx.scene.web.WebView;
import seng202.group9.Controller.App;
import seng202.group9.Controller.DataException;
import seng202.group9.Controller.Dataset;
import seng202.group9.Controller.SceneCode;
import seng202.group9.Core.Airport;
import seng202.group9.Core.FlightPath;
import seng202.group9.Core.RoutePath;
import seng202.group9.Map.Map;
@ -22,6 +24,7 @@ import seng202.group9.Core.FlightPoint;
import java.net.URL;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.ResourceBundle;
/**
@ -31,9 +34,8 @@ import java.util.ResourceBundle;
public class FlightSummaryController extends Controller {
private Dataset theDataSet = null;
private int currentPathId = 0;
private int currentPathIndex = 0;
private int currentPathIndex = 0;
@FXML
private Button flightRawData;
@ -43,6 +45,9 @@ public class FlightSummaryController extends Controller {
@FXML
ListView<String> flightPathListView;
final ObservableList<String> flightList = FXCollections.observableArrayList();
@FXML
ListView<String> flightSummaryListView;
final ObservableList<String> infoList = FXCollections.observableArrayList();
/**
* Changes to the Flight Raw Data Scene when the Raw Data Button is clicked.
@ -54,7 +59,9 @@ public class FlightSummaryController extends Controller {
/**
* Changes to the Airport Summary Scene when the Airport is clicked.
*/
public void airportSummaryButton() { replaceSceneContent(SceneCode.AIRPORT_SUMMARY); }
public void airportSummaryButton() {
replaceSceneContent(SceneCode.AIRPORT_SUMMARY);
}
/**
* Changes to the Route Summary Scene when the Route Button is clicked.
@ -70,6 +77,73 @@ public class FlightSummaryController extends Controller {
replaceSceneContent(SceneCode.AIRLINE_SUMMARY);
}
/**
* Loads the current flight paths summary information into the ListView panel. The summary data includes the distance
* and the name of the source and destination airports pulled from the Airport array list.
*/
public void flightSummaryListView() {
try {
currentPathId = theDataSet.getFlightPaths().get(0).getID(); //Sets the default to the 1st Path
FlightPath currentPath = theDataSet.getFlightPathDictionary().get(currentPathId);
ArrayList<FlightPoint> flightPoints = currentPath.getFlightPoints();
FlightPoint firstPoint = flightPoints.get(0);
String firstPointICAO = firstPoint.getName();
FlightPoint lastPoint = flightPoints.get(flightPoints.size()-1);
String lastPointICAO = lastPoint.getName();
ArrayList<Airport> airportList = theDataSet.getAirports();
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;
}
if(current.getICAO().equals(lastPointICAO)){
destinationAirport = current;
}
}
String source = "Not Available";
String destination = "Not Available";
double distance = 0.0;
if(sourceAirport != null){
source = sourceAirport.getName();
}
if(destinationAirport != null){
destination = destinationAirport.getName();
}
if(destination != "Not Available" && source != "Not Available"){
distance = sourceAirport.calculateDistance(destinationAirport);
}
infoList.add(" Flight Path Summary Information");
infoList.add("");
infoList.add("Total Distance of Flight:");
infoList.add(Double.toString(distance));
infoList.add("Source Airport:");
infoList.add(source);
infoList.add("Destination Airport:");
infoList.add(destination);
if(sourceAirport == null || destinationAirport == null){
infoList.add("");
infoList.add("Missing Data is due to first or last points");
infoList.add("ICAO codes not being present in the Airline");
infoList.add("Database!");
}
flightSummaryListView.setItems(infoList);
} catch(Exception e) {
e.printStackTrace();
}
}
/**
* Loads the Flight paths into the List View and waits for a mouse clicked event for which it will update the table
* to display the selected Flight paths points. Called from the MenuController.
@ -85,6 +159,17 @@ public class FlightSummaryController extends Controller {
String flightPathDisplayName = Integer.toString(pathID) + "_" + pathSource + "_" + pathDestin;
flightList.add(flightPathDisplayName);
}
flightPathListView.setOnMouseClicked(new EventHandler<MouseEvent>() {
public void handle(MouseEvent event) {
String flightPathDisplayNameClicked = flightPathListView.getSelectionModel().getSelectedItem();
String[] segments = flightPathDisplayNameClicked.split("_");
String pathIdClicked = segments[0];
currentPathIndex = theDataSet.getFlightPaths().indexOf(theDataSet.getFlightPathDictionary()
.get(Integer.parseInt(pathIdClicked)));
currentPathId = Integer.parseInt(pathIdClicked);
}
});
flightPathListView.setItems(flightList);
} catch (Exception e) {
e.printStackTrace();
@ -96,7 +181,7 @@ public class FlightSummaryController extends Controller {
public void load() {
try {
theDataSet = getParent().getCurrentDataset();
ArrayList<FlightPath> flightPaths = new ArrayList();
ArrayList<FlightPath> flightPaths;
flightPaths = theDataSet.getFlightPaths();
for(int i = 0; i<flightPaths.size(); i++ ){
int pathID = flightPaths.get(i).getID();
@ -106,6 +191,7 @@ public class FlightSummaryController extends Controller {
flightList.add(flightPathDisplayName);
}
flightPathListView.setItems(flightList);
flightSummaryListView();
} catch (Exception e) {
e.printStackTrace();

@ -0,0 +1,33 @@
package seng202.group9.GUI;
import seng202.group9.Controller.SceneCode;
/**
* Created by spe76 on 26/09/16.
*/
public class GettingStartedController extends Controller {
public void load() {
}
public void importAirlines() {
Importer importer = new Importer(SceneCode.AIRLINE_RAW_DATA, getParent(), getParent().getPrimaryStage());
}
public void importAirports() {
Importer importer = new Importer(SceneCode.AIRPORT_RAW_DATA, getParent(), getParent().getPrimaryStage());
}
public void importRoutes() {
Importer importer = new Importer(SceneCode.ROUTE_RAW_DATA, getParent(), getParent().getPrimaryStage());
}
public void importFlightData() {
Importer importer = new Importer(SceneCode.FLIGHT_RAW_DATA, getParent(), getParent().getPrimaryStage());
}
public void goToAirlineSummary() {
replaceSceneContent(SceneCode.AIRLINE_SUMMARY);
}
}

@ -0,0 +1,78 @@
package seng202.group9.GUI;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.control.ListView;
import javafx.scene.control.TextArea;
import javafx.scene.layout.Pane;
import javafx.scene.text.Text;
import javafx.scene.text.TextFlow;
/**
* Created by spe76 on 30/09/16.
*/
public class HelpController extends Controller {
@FXML
private ListView listView;
@FXML
private TextFlow textArea;
public static final ObservableList menu = FXCollections.observableArrayList();
Text text = new Text();
public void load() {
menu.addAll("Importing Data", "Viewing Data", "Manipulating Data", "Analysis");
text = new Text("Please select an option on the left side menu to display its contents.");
textArea.getChildren().add(text);
listView.setItems(menu);
}
public void sss() {
String menuValue = listView.getSelectionModel().getSelectedItem().toString();
textArea.getChildren().clear();
if (menuValue == "Importing Data") {
text = new Text("You can import data from the first start up of the application and " +
"from the 'File' menu on the top of the screen.\nTo import data, select the type " +
"of data you wish to import. Then select the file (.csv and .txt file) from the " +
"file selector. The data will be loaded into the program and taken to the " +
"corresponding summary page.");
textArea.getChildren().add(text);
} else if (menuValue == "Viewing Data") {
text = new Text("There are two types of views available: Summary view and Raw Data view. " +
"These are accessable from the menu on the top of the screen under the " +
"'View' tab. You first choose which set of data you want to view and then you can select" +
" either 'Summary' or 'Raw Data'.\n" +
"The summary view does not have every column but provides a map of where the " +
"place is.\nThe raw data view allows the user to view the full data table.");
textArea.getChildren().add(text);
} else if (menuValue == "Manipulating Data") {
text = new Text("Data manipulation is all available in the Raw Data views. There are four " +
"ways to manipulate data: 'Add', 'Filter', 'Edit' and 'Delete'.\n" +
"Add: To add a new entry, first go to the raw data view for that data type. Then click " +
"on the add button located on the bottom of the page. Then fill out the entries in the " +
"pop-up box and click add at the bottom of the screen. If there is an error with your entry, " +
"a message will pop up to help you.\n" +
"Filter: To filter all current entries, click on the filter option and a pop " +
"up will appear. Then type in the fields you wish to filter by and press the filter button. " +
"The table should update with the fields specified.\n" +
"Edit: The edit function can be accessed by right clicking on the entry you wish to edit and" +
" clicking the edit option. This will lead to a pop up where you can edit the current entry. " +
" When the edit has been completed, you can press the apply button on the bottom of the pop up. " +
"Again, when the program detects an invalid field, a message will pop up.\n" +
"Delete: The delete function is also accessed by right clicking an entry and pressing the delete field. " +
"This will come up with a pop up to confirm your delete. When you press ok, the entry will be deleted " +
"from the program. The program also allows multiple deletes.");
textArea.getChildren().add(text);
} else if (menuValue == "Analysis") {
text = new Text("There are two ways to do analysis.\nThe first method is to go to the raw data page and " +
"press analyse. This will come up with specific graphs that are related to the set of data." +
"\nThe second method is by accessing the 'Analysis' button on the menu on the top of the page. " +
"You can select which type of analysis you want from here.");
textArea.getChildren().add(text);
}
}
}

@ -74,6 +74,14 @@ public class MenuController extends Controller{
replaceSceneContent(SceneCode.FLIGHT_RAW_DATA);
}
public void goToGettingStarted() {
replaceSceneContent(SceneCode.INITIAL);
}
public void goToHelp() {
createPopUpStage(SceneCode.HELP, 600, 400);
}
public void load() {
//nothing to load
}

@ -17,7 +17,7 @@
<?import javafx.scene.text.Text?>
<?import javafx.scene.web.WebView?>
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.FlightSummaryController">
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.FlightSummaryController">
<children>
<ScrollPane hbarPolicy="NEVER" prefHeight="800.0" prefWidth="800.0" vbarPolicy="NEVER">
<content>
@ -85,28 +85,28 @@
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="347.0" minHeight="10.0" prefHeight="346.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="356.0" minHeight="10.0" prefHeight="152.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="392.0" minHeight="10.0" prefHeight="392.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="356.0" minHeight="10.0" prefHeight="143.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Pane prefHeight="160.0" prefWidth="295.0" GridPane.rowIndex="1">
<Pane prefHeight="161.0" prefWidth="316.0" GridPane.rowIndex="1">
<children>
<Button layoutX="26.0" layoutY="82.0" mnemonicParsing="false" onAction="#airportSummaryButton" prefHeight="25.0" prefWidth="65.0" text="Airports">
<Button layoutX="26.0" layoutY="47.0" mnemonicParsing="false" onAction="#airportSummaryButton" prefHeight="25.0" prefWidth="65.0" text="Airports">
<font>
<Font size="12.0" />
</font>
</Button>
<Button layoutX="127.0" layoutY="82.0" mnemonicParsing="false" onAction="#airlineSummaryButton" prefHeight="25.0" prefWidth="65.0" text="Airlines">
<Button layoutX="126.0" layoutY="47.0" mnemonicParsing="false" onAction="#airlineSummaryButton" prefHeight="25.0" prefWidth="65.0" text="Airlines">
<font>
<Font size="12.0" />
</font>
</Button>
<Button layoutX="227.0" layoutY="82.0" mnemonicParsing="false" onAction="#routeSummaryButton" prefHeight="25.0" prefWidth="65.0" text="Routes">
<Button layoutX="227.0" layoutY="47.0" mnemonicParsing="false" onAction="#routeSummaryButton" prefHeight="25.0" prefWidth="65.0" text="Routes">
<font>
<Font size="12.0" />
</font>
</Button>
<Button layoutX="26.0" layoutY="132.0" mnemonicParsing="false" onAction="#handleRawDataButton" prefHeight="25.0" prefWidth="266.0" text="Flights Raw Data" />
<Button layoutX="26.0" layoutY="84.0" mnemonicParsing="false" onAction="#handleRawDataButton" prefHeight="25.0" prefWidth="266.0" text="Flights Raw Data" />
</children>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
@ -114,9 +114,9 @@
</Pane>
<Pane prefHeight="200.0" prefWidth="200.0">
<children>
<Pane prefHeight="350.0" prefWidth="316.0">
<Pane prefHeight="393.0" prefWidth="316.0">
<children>
<ListView layoutX="25.0" layoutY="76.0" prefHeight="258.0" prefWidth="266.0" />
<ListView fx:id="flightSummaryListView" layoutX="25.0" layoutY="76.0" prefHeight="317.0" prefWidth="266.0" />
</children>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />

@ -0,0 +1,76 @@
<?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.*?>
<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">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="160.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="160.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="160.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="160.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="160.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="453.0" minHeight="0.0" prefHeight="444.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="505.0" minHeight="10.0" prefHeight="150.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="293.0" minHeight="10.0" prefHeight="100.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Button mnemonicParsing="false" onAction="#importAirlines" text="Import Airlines" GridPane.halignment="CENTER" GridPane.rowIndex="2">
<GridPane.margin>
<Insets bottom="15.0" />
</GridPane.margin>
</Button>
<Button mnemonicParsing="false" onAction="#importAirports" text="Import Airports" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2">
<GridPane.margin>
<Insets bottom="15.0" />
</GridPane.margin>
</Button>
<Button mnemonicParsing="false" onAction="#importRoutes" text="Import Routes" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="2">
<GridPane.margin>
<Insets bottom="15.0" />
</GridPane.margin>
</Button>
<Button mnemonicParsing="false" onAction="#importFlightData" text="Import Flights" GridPane.columnIndex="3" GridPane.halignment="CENTER" GridPane.rowIndex="2">
<GridPane.margin>
<Insets bottom="15.0" />
</GridPane.margin>
</Button>
<Label text="Welcome!" GridPane.columnSpan="5" GridPane.halignment="CENTER">
<font>
<Font size="36.0" />
</font>
<GridPane.margin>
<Insets left="15.0" />
</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">
<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>
</children>
</GridPane>

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.media.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.text.*?>
<?import javafx.scene.control.*?>
<?import java.lang.*?>
<?import javafx.scene.layout.*?>
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.HelpController">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="286.0" minWidth="10.0" prefWidth="200.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="471.0" minWidth="10.0" prefWidth="400.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="126.0" minHeight="0.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="305.0" minHeight="10.0" prefHeight="289.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label text="Help Section" GridPane.columnSpan="2" GridPane.halignment="CENTER">
<font>
<Font size="24.0" />
</font>
</Label>
<ListView fx:id="listView" onMouseClicked="#sss" prefHeight="303.0" prefWidth="208.0" GridPane.rowIndex="1">
<GridPane.margin>
<Insets bottom="10.0" left="10.0" right="10.0" />
</GridPane.margin>
</ListView>
<ScrollPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
<GridPane.margin>
<Insets bottom="10.0" right="10.0" />
</GridPane.margin>
<content>
<TextFlow fx:id="textArea" maxHeight="-Infinity" maxWidth="-Infinity" prefHeight="289.0" prefWidth="364.0" textAlignment="JUSTIFY" />
</content>
</ScrollPane>
</children>
<padding>
<Insets top="10.0" />
</padding>
</GridPane>

@ -1,12 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.control.Menu?>
<?import javafx.scene.control.MenuBar?>
<?import javafx.scene.control.MenuItem?>
<?import javafx.scene.control.SeparatorMenuItem?>
<?import javafx.scene.layout.VBox?>
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.45" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.MenuController">
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.MenuController">
<children>
<MenuBar>
<menus>
@ -49,6 +52,12 @@
<items>
<MenuItem mnemonicParsing="false" onAction="#veiwDistCalc" text="Calculate distance between Airports" />
</items></Menu>
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem mnemonicParsing="false" onAction="#goToGettingStarted" text="Getting Started" />
<MenuItem mnemonicParsing="false" onAction="#goToHelp" text="Help Page" />
</items>
</Menu>
</menus>
</MenuBar>
</children>

@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ContextMenu?>
@ -13,7 +18,7 @@
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.text.Font?>
<GridPane alignment="CENTER" 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.RouteRDController">
<GridPane alignment="CENTER" 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.RouteRDController">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
@ -80,5 +85,18 @@
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
</GridPane.margin>
</Button>
<Label text="Note: Airline, source airport and destination airports" GridPane.columnIndex="1" GridPane.valignment="TOP">
<GridPane.margin>
<Insets />
</GridPane.margin>
<padding>
<Insets top="5.0" />
</padding>
</Label>
<Label text="are in either IATA or ICAO code." GridPane.columnIndex="1">
<padding>
<Insets top="5.0" />
</padding>
</Label>
</children>
</GridPane>

Loading…
Cancel
Save