Fixed Merge COnflicts

main
YaFedImYaEatIm 9 years ago
commit c752ed969e

@ -55,8 +55,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>

Binary file not shown.

@ -13,7 +13,8 @@ public enum SceneCode {
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"), HELP("help.fxml"),
FLIGHT_ADD("flight_add_form.fxml"), ROUTE_BY_AIRPORT("airport_map_routes.fxml"), ROUTE_BY_EQUIP("route_by_equip.fxml"),
FLIGHT_ADD("flight_add_form.fxml"), ROUTE_BY_AIRPORT("airport_map_routes.fxml"), ROUTE_BY_EQUIP("route_by_equip.fxml"), ANALYSER_TAB("analyser_main_page.fxml"), CHART_ERROR("too_many_options_pie.fxml"),
BAR_GRAPH_CHOOSER("bar_graph_chooser.fxml"), PIE_GRAPH_CHOOSER("pie_graph_chooser.fxml"), FLIGHT_PATH_ADD("new_flight_path.fxml"),
POP_UP_AIRPORT_MAP("pop_up_airport_map.fxml"), POP_UP_ROUTE_MAP("pop_up_route_map.fxml");

@ -6,6 +6,7 @@ import seng202.group9.Core.Airline;
import seng202.group9.Core.FlightPoint;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
/**
@ -13,6 +14,7 @@ import java.util.HashMap;
* Users last session state is store here.
*/
public class Session implements Serializable {
private SceneCode sceneDisplayed;
private int currentFlightPointID;
@ -20,6 +22,51 @@ public class Session implements Serializable {
private HashMap<Integer, String> filteredAirlines;
private HashMap<Integer, String> filteredAirports;
private HashMap<Integer, String> filteredRoutes;
private String selectedgraphagainst;
private String selectedgraphoptions;
private Boolean usefilter;
private Boolean forceGraph;
private String selectedDataToGraph;
public Boolean getForceGraph() {
return forceGraph;
}
public void setForceGraph(Boolean forceGraph) {
this.forceGraph = forceGraph;
}
public String getSelectedDataToGraph() {
return selectedDataToGraph;
}
public void setSelectedDataToGraph(String selectedDataToGraph) {
this.selectedDataToGraph = selectedDataToGraph;
}
public String getSelectedgraphagainst() {
return selectedgraphagainst;
}
public void setSelectedgraphagainst(String selectedgraphagainst) {
this.selectedgraphagainst = selectedgraphagainst;
}
public String getSelectedgraphoptions() {
return selectedgraphoptions;
}
public void setSelectedgraphoptions(String selectedgraphoptions) {
this.selectedgraphoptions = selectedgraphoptions;
}
public Boolean getUsefilter() {
return usefilter;
}
public void setUsefilter(Boolean usefilter) {
this.usefilter = usefilter;
}
private String airlineToEdit;
private String airportToEdit;

@ -1,81 +0,0 @@
package seng202.group9.GUI;
import javafx.fxml.FXML;
import javafx.scene.chart.BarChart;
import javafx.scene.chart.PieChart;
import javafx.scene.chart.XYChart;
import seng202.group9.Controller.App;
import seng202.group9.Controller.Dataset;
import seng202.group9.Core.Airline;
import java.util.ArrayList;
import java.util.HashMap;
import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.chart.*;
import javafx.scene.Group;
import seng202.group9.Core.Airport;
/**
* Gui controller class currently for creating the bar graph of routes arriving and departing from airports.
* Extend the class. {@link Controller}
* Created by michael on 17/09/2016.
*/
public class AirportAnalyser extends Controller {
//links fxml parts to the controller.
@FXML
PieChart pieGraph;
//Used to store the data needed for making the graph.
private Dataset currentdata = null;
private HashMap<String, Integer> useddata = new HashMap<String, Integer>();
private ArrayList<Airport> current_routes;
/**
* Takes data from the current dataset and places it into the displayed pie graph.
*/
public void build_graph(){
//Takes Airports from the full dataset.
current_routes = currentdata.getAirports();
datasetup(current_routes);
//Turns the data into a usable list.
ObservableList<PieChart.Data> pieChartData = FXCollections.observableArrayList();
System.out.println(useddata.keySet().size());
for (String airport : useddata.keySet()){
Integer temp = useddata.get(airport);
pieChartData.add(new PieChart.Data(airport,temp));
}
//Gives the data to the graph.
pieGraph.setData(pieChartData);
}
/**
* Takes the raw list of routes and fills the used data dictionary with the appropriate data to be displayed
* @param current_air_ports
*/
private void datasetup(ArrayList<Airport> current_air_ports){
//Takes out the specified field then adds to the used data dict.
for (Airport entry : current_air_ports){
String name = entry.getCountryName();
if (useddata.containsKey(name)){
int temp = useddata.get(name);
useddata.replace(name,temp+1);
}else {
Integer temp = 1;
useddata.put(name,temp);
}
}
}
/**
* Takes the current dataset then loads the data to the graph using build graph.
*/
public void load() {
if (!checkDataset()){
return;
}
currentdata = getParent().getCurrentDataset();
build_graph();
}
}

@ -92,13 +92,11 @@ public class AirportFilterController extends Controller {
filter.filterOlson(airpTzFilter.getText());
}
Alert alert = new Alert(Alert.AlertType.INFORMATION);
alert.setTitle("Airline Filter Successful");
alert.setHeaderText("Airline data filtered!");
alert.setContentText("Your airline data has been successfully filtered.");
alert.setTitle("Airport Filter Successful");
alert.setHeaderText("Airport data filtered!");
alert.setContentText("Your airport data has been successfully filtered.");
alert.showAndWait();
//currentSession.setFilteredAirlines(FXCollections.observableArrayList(filter.getFilteredData()));
HashMap<Integer, String> airportsHM = new HashMap<Integer, String>();
ArrayList<Airport> airports = filter.getFilteredData();
for (int index = 0; index < airports.size(); index++) {

@ -131,7 +131,7 @@ public class AirportRDController extends Controller{
/**
* Analyses the current data and creates a graph based on the data.
* @see AirportAnalyser
* @see PieGraphController
*/
public void analyse_Button(){ replaceSceneContent(SceneCode.AIRPORT_ANALYSER);}

@ -0,0 +1,19 @@
package seng202.group9.GUI;
import seng202.group9.Controller.SceneCode;
/**
* Created by michael on 24/09/2016.
*/
public class AnalyserController extends Controller{
public void barGraphButton(){
replaceSceneContent(SceneCode.BAR_GRAPH_CHOOSER);
}
public void pieGraphButton(){
replaceSceneContent(SceneCode.PIE_GRAPH_CHOOSER);
}
public void load() {}
}

@ -0,0 +1,23 @@
package seng202.group9.GUI;
import seng202.group9.Controller.SceneCode;
import seng202.group9.Controller.Session;
/**
* Created by michael on 2/10/2016.
*/
public class BarChartErrorController extends Controller {
private Session currentSession;
public void load(){
currentSession = this.getParent().getSession();
}
public void ignoredWarning() {
currentSession.setForceGraph(Boolean.TRUE);
replaceSceneContent(SceneCode.ROUTE_ANALYSER);
}
public void backToSafety(){
replaceSceneContent(SceneCode.BAR_GRAPH_CHOOSER);
}
}

@ -0,0 +1,80 @@
package seng202.group9.GUI;
import javafx.beans.Observable;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.control.CheckBox;
import javafx.scene.control.ChoiceBox;
import javafx.scene.control.ListView;
import javafx.scene.control.SelectionMode;
import seng202.group9.Controller.SceneCode;
import seng202.group9.Controller.Session;
import java.util.ArrayList;
/**
* Created by michael on 24/09/2016.
*/
public class BarChooserController extends Controller{
@FXML
ChoiceBox datatypechooser;
@FXML
ListView graph_against;
@FXML
ListView graph_options;
@FXML
CheckBox usefilter;
ObservableList airportOptions = FXCollections.observableArrayList("Name", "ICAO", "IATA FFA", "Altitude",
"City", "Country");
ObservableList airlineOptions = FXCollections.observableArrayList("ID", "Name", "ICAO", "IATA", "Alias",
"Call Sign", "Active", "Country");
ObservableList routeOptions = FXCollections.observableArrayList("ID", "Stops", "Codeshare", "Equipment", "Airline",
"Departure Airport", "Arival airport");
ArrayList<ObservableList> allOptions = new ArrayList<ObservableList>();
public void buildGraph() {
Session currentsession = this.getParent().getSession();
currentsession.setSelectedgraphoptions(graph_against.getSelectionModel().getSelectedItem().toString());
currentsession.setSelectedgraphagainst(graph_options.getSelectionModel().getSelectedItem().toString());
currentsession.setUsefilter(usefilter.isSelected());
currentsession.setForceGraph(Boolean.FALSE);
replaceSceneContent(SceneCode.ROUTE_ANALYSER);
}
public void returnToSelection(){replaceSceneContent(SceneCode.PIE_GRAPH_CHOOSER);}
public void changeTables(){
int temp = datatypechooser.getSelectionModel().getSelectedIndex();
graph_against.setItems(allOptions.get(temp));
graph_options.setItems(allOptions.get(temp));
}
public void load(){
if (!checkDataset()){
return;
}
datatypechooser.setItems(FXCollections.observableArrayList("Airports","Airlines","Routes"));
datatypechooser.getSelectionModel().selectFirst();
datatypechooser.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {
public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
changeTables();
}
});
graph_against.setItems(airportOptions);
graph_against.getSelectionModel().selectFirst();
graph_options.setItems(airportOptions);
graph_options.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
graph_options.getSelectionModel().selectFirst();
allOptions.add(airportOptions);
allOptions.add(airlineOptions);
allOptions.add(routeOptions);
}
}

@ -0,0 +1,154 @@
package seng202.group9.GUI;
import javafx.fxml.FXML;
import javafx.scene.chart.BarChart;
import javafx.scene.chart.XYChart;
import seng202.group9.Controller.App;
import seng202.group9.Controller.Dataset;
import seng202.group9.Controller.Session;
import seng202.group9.Core.Airline;
import seng202.group9.Core.Airport;
import seng202.group9.Core.Route;
import java.util.ArrayList;
import java.util.HashMap;
/**
* Gui controller class currently for creating the bar graph of routes arriving and departing from airports.
* Extend the class. {@link Controller}
* Created by michael on 16/09/2016.
*/
public class BarGraphController extends Controller {
//Links fxml to the controller.
@FXML
private BarChart analyserGraph;
//Used to store the data needed for making the tables.
private ArrayList<Route> current_routes;
private Dataset currentdata = null;
private HashMap<String, ArrayList> useddata = new HashMap<String, ArrayList>();
private Session currentsession;
/**
* Takes data from the current dataset and places it into the displayed bar graph.
*/
public void build_graph(){
//Takes routes from the full dataset.
current_routes = currentdata.getRoutes();
//datasetup(current_routes);
//Builds series needed for the graph.
XYChart.Series seriesArivals = new XYChart.Series();
XYChart.Series seriesDeparts = new XYChart.Series();
seriesArivals.setName("Arriving routes");
seriesDeparts.setName("Departs routes");
for (String airport : useddata.keySet()){
ArrayList<Integer> temp = useddata.get(airport);
seriesArivals.getData().add(new XYChart.Data(airport,temp.get(0)));
seriesDeparts.getData().add(new XYChart.Data(airport,temp.get(1)));
}
//Gives the formatted data to the graph.
analyserGraph.getData().addAll(seriesArivals,seriesDeparts);
}
/**
* Takes the raw list of routes and fills the used data dictionary with the appropriate data to be displayed
* @param current_routes
*/
private int stops;
private String codeShare;
private String equipment;
private String airlineName;
private String departureAirport;
private String arrivalAirport;
/** private void datasetupCustomarAirport(ArrayList<Airport> current_air_ports){
//Takes out the specified field then adds to the used data dict.
for (Airport entry : current_air_ports){
currentsession.getSelectedgraphagainst() == "Name";
name = entry.getName();
currentsession.getSelectedgraphagainst() == "ICAO";
name = entry.getICAO();
currentsession.getSelectedgraphagainst() == "IATA_FFA"
name = entry.getIATA_FFA();
currentsession.getSelectedgraphagainst() == "City"
currentsession.getSelectedgraphagainst() == "Country"
name = entry.getCountryName();
if (useddata.containsKey(name)){
int temp = useddata.get(name);
useddata.replace(name,temp+1);
}else {
Integer temp = 1;
useddata.put(name,temp);
}
}
}
*/
private void datasetupCustomRoute(ArrayList<Route> current_routes){
//Takes out the specified field (Currently departure airport and arrival airport) then adds to the used data dict.
//if(currentsession.getSelectedgraphagainst() = ""){
//}
}
/**
* Takes the current dataset then loads the data to the graph using build graph.
*/
public void load() {
currentdata = getParent().getCurrentDataset();
currentsession = this.getParent().getSession();
String temp = currentsession.getSelectedDataToGraph();
if (temp == "Airports") {
ArrayList<Airport> d = new ArrayList();
if (currentsession.getUsefilter()){
for(int i = 0; i < currentdata.getAirports().size(); i++) {
if (currentsession.getFilteredAirports().containsValue(currentdata.getAirports().get(i).getName())
&& currentsession.getFilteredAirports().containsKey(i)) {
d.add(currentdata.getAirports().get(i));
}
}
}
else{
d = currentdata.getAirports();
}
//datasetupCustomarAirport(d);
}
else if (temp == "Airlines"){
ArrayList<Airline> d = new ArrayList();
if (currentsession.getUsefilter()){
for(int i = 0; i < currentdata.getAirports().size(); i++) {
if (currentsession.getFilteredAirlines().containsValue(currentdata.getAirlines().get(i).getName())
&& currentsession.getFilteredAirlines().containsKey(i)) {
d.add(currentdata.getAirlines().get(i));
}
}
}
else{
d = currentdata.getAirlines();
}
//datasetupCustomarAirline(d);
}
else if (temp == "Routes") {
ArrayList<Route> d = new ArrayList();
if (currentsession.getUsefilter()){
for(int i = 0; i < currentdata.getRoutes().size(); i++) {
if (currentsession.getFilteredRoutes().containsValue(currentdata.getRoutes().get(i).getAirlineName())
&& currentsession.getFilteredRoutes().containsKey(i)) {
d.add(currentdata.getRoutes().get(i));
}
}
}
else{
d = currentdata.getRoutes();
}
datasetupCustomRoute(d);
}
build_graph();
}
}

@ -56,25 +56,6 @@ public class FlightRDController extends Controller {
ListView<String> flightPathListView;
private ObservableList<String> flightList = FXCollections.observableArrayList();
// @FXML
// private TextField flightNameBox;
// @FXML
// private TextField flightTypeBox;
// @FXML
// private TextField flightViaBox;
// @FXML
// private TextField flightAltitudeBox;
// @FXML
// private TextField flightLatitudeBox;
// @FXML
// private TextField flightLongitudeBox;
// @FXML
// private TextField flightHeadingBox;
// @FXML
// private TextField flightLegDistBox;
// @FXML
// private TextField flightTotDistBox;
/**
* 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.
@ -166,16 +147,9 @@ public class FlightRDController extends Controller {
* Creates a pop up dialog which prompts the user for two ICAO airport codes which will use when creating a new path.
*/
public void newPath() {
NewPathPopUp dialogBox = new NewPathPopUp();
dialogBox.display();
String destAirport = dialogBox.getDestinationAirport();
String sourceAirport = dialogBox.getSourceAirport();
if (destAirport != null && sourceAirport != null){
theDataSet.addFlightPath(sourceAirport, destAirport);
flightPathListView.getItems().clear();
flightPathListView();
}
createPopUpStage(SceneCode.FLIGHT_PATH_ADD, 500, 240);
flightPathListView.getItems().clear();
flightPathListView();
}
/**
* Removes the selected point from the table and database.

@ -67,6 +67,8 @@ public class MenuController extends Controller{
replaceSceneContent(SceneCode.ROUTE_SUMMARY);
}
public void viewAnalyserMain() { replaceSceneContent(SceneCode.ANALYSER_TAB);}
/**
* view Routes by the Destination / Arrival Airport
*/

@ -0,0 +1,58 @@
package seng202.group9.GUI;
import javafx.fxml.FXML;
import javafx.scene.control.Alert;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.stage.Stage;
import seng202.group9.Controller.Dataset;
import seng202.group9.Controller.EntryParser;
/**
* The controller class for new_flight_path.fxml.
* Created by Sunguin.
*/
public class NewPathController extends Controller {
@FXML
private TextField sourceAirport;
@FXML
private TextField destinationAirport;
@FXML
private Button addButton;
private Dataset theDataSet = null;
public void load() {
theDataSet = getParent().getCurrentDataset();
}
/**
* Attempts to add a new flight path. First uses the entry parser to check for valid ICAO codes.
*/
public void addPath() {
EntryParser airportCheck = new EntryParser();
try {
airportCheck.parsePointName(sourceAirport.getText());
airportCheck.parsePointName(destinationAirport.getText());
theDataSet.addFlightPath(sourceAirport.getText(), destinationAirport.getText());
//Saying to the user that the flight path has successfully added.
Alert alert = new Alert(Alert.AlertType.INFORMATION);
alert.setTitle("Flight Path Add Successful");
alert.setHeaderText("New Flight Path added!");
alert.setContentText("Your new flight path has been successfully added into the database.");
alert.showAndWait();
//Closes the add form.
Stage stage = (Stage) addButton.getScene().getWindow();
stage.close();
} catch (Exception e) {
//Tells the user what and where the error is.
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Flight Path Data Error");
alert.setHeaderText("Error adding a custom flight path entry.");
alert.setContentText(e.getMessage());
alert.showAndWait();
}
}
}

@ -1,75 +0,0 @@
package seng202.group9.GUI;
import javafx.scene.control.Alert;
import seng202.group9.Controller.DataException;
import seng202.group9.Controller.EntryParser;
import seng202.group9.Core.FlightPoint;
import javax.swing.*;
import java.awt.*;
import static java.awt.Color.red;
/**
* Creates the pop up box where the user will enter the Source and Destination airports for the path name, will reject
* empty strings, strings of length 4 and characters that are not A-Z. Will convert lowercase to uppercase.
* Created by Liam Beckett on 17/09/2016.
*/
public class NewPathPopUp {
private String sourceAirport = null;
private String destinationAirport = null;
// Creates and displays the pop up box for the user to input data.
public void display() {
JTextField field1 = new JTextField();
JTextField field2 = new JTextField();
JPanel panel = new JPanel(new GridLayout(0, 1));
panel.add(new JLabel("Source Airport ICAO Code" ));
panel.add(field1);
panel.add(new JLabel("Destination Airport ICAO Code: "));
panel.add(field2);
int result = JOptionPane.showConfirmDialog(null, panel, "Test",
JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
if (result == JOptionPane.OK_OPTION) {
sourceAirport = field1.getText().toUpperCase();
destinationAirport = field2.getText().toUpperCase();
try{
EntryParser parser = new EntryParser();
parser.parsePointName(sourceAirport);
}catch (DataException e){
sourceAirport = null;
destinationAirport = null;
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Flight Path Name Error");
alert.setHeaderText("Error adding the Source airport ICAO code.");
alert.setContentText(e.getMessage());
alert.showAndWait();
}
try{
EntryParser parser = new EntryParser();
parser.parsePointName(destinationAirport);
}catch (DataException e){
sourceAirport = null;
destinationAirport = null;
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Flight Path Name Error");
alert.setHeaderText("Error adding the Destination airport ICAO code.");
alert.setContentText(e.getMessage());
alert.showAndWait();
}
} else {
sourceAirport = null;
destinationAirport = null;
}
}
public String getSourceAirport() {
return sourceAirport;
}
public String getDestinationAirport() {
return destinationAirport;
}
}

@ -0,0 +1,23 @@
package seng202.group9.GUI;
import seng202.group9.Controller.SceneCode;
import seng202.group9.Controller.Session;
/**
* Created by michael on 2/10/2016.
*/
public class PieChartErrorController extends Controller {
private Session currentSession;
public void load(){
currentSession = this.getParent().getSession();
}
public void ignoredWarning() {
currentSession.setForceGraph(true);
replaceSceneContent(SceneCode.AIRPORT_ANALYSER);
}
public void backToSafety(){
replaceSceneContent(SceneCode.PIE_GRAPH_CHOOSER);
}
}

@ -0,0 +1,89 @@
package seng202.group9.GUI;
import javafx.beans.Observable;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.control.CheckBox;
import javafx.scene.control.ChoiceBox;
import javafx.scene.control.ListView;
import javafx.scene.control.SelectionMode;
import seng202.group9.Controller.SceneCode;
import seng202.group9.Controller.Session;
import java.util.ArrayList;
/**
* Created by michael on 24/09/2016.
*/
public class PieChooserController extends Controller{
@FXML
ChoiceBox datatypechooser;
@FXML
ListView graph_options;
@FXML
CheckBox usefilter;
ObservableList airportOptions = FXCollections.observableArrayList("Name", "ICAO", "IATA FFA", "Altitude",
"City", "Country");
ObservableList airlineOptions = FXCollections.observableArrayList("Name", "ICAO", "IATA", "Active", "Country");
ObservableList routeOptions = FXCollections.observableArrayList("Stops", "Codeshare", "Equipment", "Airline",
"Departure Airport", "Arival airport");
ArrayList<ObservableList> allOptions = new ArrayList<ObservableList>();
public void toBarGraphChooser(){replaceSceneContent(SceneCode.BAR_GRAPH_CHOOSER);}
public void buildGraph() {
Session currentsession = this.getParent().getSession();
ArrayList<String> temp = new ArrayList<String>();
currentsession.setSelectedDataToGraph(datatypechooser.getSelectionModel().getSelectedItem().toString());
currentsession.setSelectedgraphagainst(graph_options.getSelectionModel().getSelectedItem().toString());
currentsession.setUsefilter(usefilter.isSelected());
currentsession.setForceGraph(false);
replaceSceneContent(SceneCode.AIRPORT_ANALYSER);
}
public void changeTables(){
int temp = datatypechooser.getSelectionModel().getSelectedIndex();
graph_options.setItems(allOptions.get(temp));
}
public void load(){
if (!checkDataset()){
return;
}
datatypechooser.setItems(FXCollections.observableArrayList("Airports","Airlines","Routes"));
datatypechooser.getSelectionModel().selectFirst();
datatypechooser.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {
public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
changeTables();
}
});
graph_options.setItems(airportOptions);
graph_options.getSelectionModel().selectFirst();
allOptions.add(airportOptions);
allOptions.add(airlineOptions);
allOptions.add(routeOptions);
}
public void newFilter(){
if (datatypechooser.getSelectionModel().getSelectedItem().toString() == "Airports"){
createPopUpStage(SceneCode.AIRPORT_FILTER, 600, 480);
}
else if (datatypechooser.getSelectionModel().getSelectedItem().toString() == "Airlines"){
createPopUpStage(SceneCode.AIRLINE_FILTER, 600, 370);
}
else if (datatypechooser.getSelectionModel().getSelectedItem().toString() == "Routes"){
createPopUpStage(SceneCode.ROUTE_FILTER, 600, 330);
}
}
}

@ -0,0 +1,208 @@
package seng202.group9.GUI;
import javafx.fxml.FXML;
import javafx.scene.chart.BarChart;
import javafx.scene.chart.PieChart;
import javafx.scene.chart.XYChart;
import seng202.group9.Controller.*;
import seng202.group9.Core.Airline;
import java.util.ArrayList;
import java.util.HashMap;
import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.chart.*;
import javafx.scene.Group;
import seng202.group9.Core.Airport;
import seng202.group9.Core.Route;
/**
* Gui controller class currently for creating the bar graph of routes arriving and departing from airports.
* Extend the class. {@link Controller}
* Created by michael on 17/09/2016.
*/
public class PieGraphController extends Controller {
//links fxml parts to the controller.
@FXML
PieChart pieGraph;
//Used to store the data needed for making the graph.
private Dataset currentdata = null;
private HashMap<String, Integer> useddata = new HashMap<String, Integer>();
private Session currentsession;
/**
* Takes data from the current dataset and places it into the displayed pie graph.
*/
public void build_graph(){
//Turns the data into a usable list.
ObservableList<PieChart.Data> pieChartData = FXCollections.observableArrayList();
System.out.println(useddata.keySet().size());
for (String airport : useddata.keySet()){
Integer temp = useddata.get(airport);
pieChartData.add(new PieChart.Data(airport,temp));
}
//Gives the data to the graph.
if (useddata.keySet().size() > 250 && !currentsession.getForceGraph()){
replaceSceneContent(SceneCode.CHART_ERROR);
}
else{
pieGraph.setData(pieChartData);
}
}
/**
* Takes the raw list of routes and fills the used data dictionary with the appropriate data to be displayed
* @param current_air_ports
*/
private void datasetupCustomarAirport(ArrayList<Airport> current_air_ports){
//Takes out the specified field then adds to the used data dict.
for (Airport entry : current_air_ports){
String name = "Error";
if (currentsession.getSelectedgraphagainst() == "Name") {
name = entry.getName();
}
else if (currentsession.getSelectedgraphagainst() == "ICAO") {
name = entry.getICAO();
}
else if (currentsession.getSelectedgraphagainst() == "IATA FFA") {
name = entry.getIATA_FFA();
}
else if (currentsession.getSelectedgraphagainst() == "Altitude") {
name = String.valueOf(entry.getAltitude());
}
else if (currentsession.getSelectedgraphagainst() == "City") {
name = entry.getCityName();
}
else if (currentsession.getSelectedgraphagainst() == "Country") {
name = entry.getCountryName();
}
if (useddata.containsKey(name)){
int temp = useddata.get(name);
useddata.replace(name,temp+1);
}else {
Integer temp = 1;
useddata.put(name,temp);
}
}
}
private void datasetupCustomarAirline(ArrayList<Airline> current_air_ports){
//Takes out the specified field then adds to the used data dict.
for (Airline entry : current_air_ports) {
String name = "Error";
if (currentsession.getSelectedgraphagainst() == "Name") {
name = entry.getName();
} else if (currentsession.getSelectedgraphagainst() == "ICAO") {
name = entry.getICAO();
} else if (currentsession.getSelectedgraphagainst() == "IATA") {
name = entry.getIATA();
} else if (currentsession.getSelectedgraphagainst() == "Country") {
name = entry.getCountryName();
} else if (currentsession.getSelectedgraphagainst() == "Active") {
name = entry.getActive();
}
if (useddata.containsKey(name)) {
int temp = useddata.get(name);
useddata.replace(name, temp + 1);
} else {
Integer temp = 1;
useddata.put(name, temp);
}
}
}
private void datasetupCustomRoute(ArrayList<Route> current_air_ports){
//Takes out the specified field then adds to the used data dict.
for (Route entry : current_air_ports){
String name = "Error";
if (currentsession.getSelectedgraphagainst() == "Stops") {
name = String.valueOf(entry.getStops());
}
else if (currentsession.getSelectedgraphagainst() == "Codeshare") {
name = entry.getCode();
}
else if (currentsession.getSelectedgraphagainst() == "Equipment") {
name = entry.getEquipment();
}
else if (currentsession.getSelectedgraphagainst() == "Airline") {
name = entry.getAirlineName();
}
else if (currentsession.getSelectedgraphagainst() == "Departure Airport") {
name = entry.getDepartureAirport();
}
else if (currentsession.getSelectedgraphagainst() == "Arival airport") {
name = entry.getArrivalAirport();
}
if (useddata.containsKey(name)){
int temp = useddata.get(name);
useddata.replace(name,temp+1);
}else {
Integer temp = 1;
useddata.put(name,temp);
}
}
}
/**
* Takes the current dataset then loads the data to the graph using build graph.
*/
public void load() {
if (!checkDataset()){
return;
}
currentdata = getParent().getCurrentDataset();
currentsession = this.getParent().getSession();
String temp = currentsession.getSelectedDataToGraph();
if (temp == "Airports") {
ArrayList<Airport> d = new ArrayList();
if (currentsession.getUsefilter()){
for(int i = 0; i < currentdata.getAirports().size(); i++) {
if (currentsession.getFilteredAirports().containsValue(currentdata.getAirports().get(i).getName())
&& currentsession.getFilteredAirports().containsKey(i)) {
d.add(currentdata.getAirports().get(i));
}
}
}
else{
d = currentdata.getAirports();
}
datasetupCustomarAirport(d);
}
else if (temp == "Airlines"){
ArrayList<Airline> d = new ArrayList();
if (currentsession.getUsefilter()){
for(int i = 0; i < currentdata.getAirports().size(); i++) {
if (currentsession.getFilteredAirlines().containsValue(currentdata.getAirlines().get(i).getName())
&& currentsession.getFilteredAirlines().containsKey(i)) {
d.add(currentdata.getAirlines().get(i));
}
}
}
else{
d = currentdata.getAirlines();
}
datasetupCustomarAirline(d);
}
else if (temp == "Routes") {
ArrayList<Route> d = new ArrayList();
if (currentsession.getUsefilter()){
for(int i = 0; i < currentdata.getRoutes().size(); i++) {
if (currentsession.getFilteredRoutes().containsValue(currentdata.getRoutes().get(i).getAirlineName())
&& currentsession.getFilteredRoutes().containsKey(i)) {
d.add(currentdata.getRoutes().get(i));
}
}
}
else{
d = currentdata.getRoutes();
}
datasetupCustomRoute(d);
}
build_graph();
}
}

@ -1,94 +0,0 @@
package seng202.group9.GUI;
import javafx.fxml.FXML;
import javafx.scene.chart.BarChart;
import javafx.scene.chart.XYChart;
import seng202.group9.Controller.App;
import seng202.group9.Controller.Dataset;
import seng202.group9.Core.Route;
import java.util.ArrayList;
import java.util.HashMap;
/**
* Gui controller class currently for creating the bar graph of routes arriving and departing from airports.
* Extend the class. {@link Controller}
* Created by michael on 16/09/2016.
*/
public class RouteAnalyser extends Controller {
//Links fxml to the controller.
@FXML
private BarChart analyserGraph;
//Used to store the data needed for making the tables.
private ArrayList<Route> current_routes;
private Dataset currentdata = null;
private HashMap<String, ArrayList> useddata = new HashMap<String, ArrayList>();
/**
* Takes data from the current dataset and places it into the displayed bar graph.
*/
public void build_graph(){
//Takes routes from the full dataset.
current_routes = currentdata.getRoutes();
datasetup(current_routes);
//Builds series needed for the graph.
XYChart.Series seriesArivals = new XYChart.Series();
XYChart.Series seriesDeparts = new XYChart.Series();
seriesArivals.setName("Arriving routes");
seriesDeparts.setName("Departs routes");
System.out.println(useddata.keySet().size());
for (String airport : useddata.keySet()){
ArrayList<Integer> temp = useddata.get(airport);
seriesArivals.getData().add(new XYChart.Data(airport,temp.get(0)));
seriesDeparts.getData().add(new XYChart.Data(airport,temp.get(1)));
}
//Gives the formatted data to the graph.
analyserGraph.getData().addAll(seriesArivals,seriesDeparts);
}
/**
* Takes the raw list of routes and fills the used data dictionary with the appropriate data to be displayed
* @param current_routes
*/
private void datasetup(ArrayList<Route> current_routes){
//Takes out the specified field (Currently departure airport and arrival airport) then adds to the used data dict.
for (Route entry : current_routes){
String departs = entry.getDepartureAirport();
String arives = entry.getArrivalAirport();
if (useddata.containsKey(departs)){
ArrayList<Integer> temp = useddata.get(departs);
temp.add(1,temp.get(1)+1);
useddata.replace(departs,temp);
}else {
ArrayList<Integer> temp = new ArrayList<Integer>(2);
temp.add(0);
temp.add(1);
useddata.put(departs,temp);
}
if (useddata.containsKey(arives)){
ArrayList<Integer> temp = useddata.get(arives);
temp.add(0,temp.get(0)+1);
useddata.replace(arives,temp);
}else {
ArrayList<Integer> temp = new ArrayList<Integer>(2);
temp.add(1);
temp.add(0);
useddata.put(arives,temp);
}
}
}
/**
* Takes the current dataset then loads the data to the graph using build graph.
*/
public void load() {
if (!checkDataset()){
return;
}
currentdata = getParent().getCurrentDataset();
build_graph();
}
}

@ -7,7 +7,6 @@ import javafx.scene.control.*;
import javafx.scene.control.cell.PropertyValueFactory;
import seng202.group9.Controller.Dataset;
import seng202.group9.Controller.SceneCode;
import seng202.group9.Controller.RouteFilter;
import seng202.group9.Controller.Session;
import seng202.group9.Core.Route;
@ -128,7 +127,7 @@ public class RouteRDController extends Controller {
/**
* Analyses the current data and creates a graph based on the data.
* @see RouteAnalyser
* @see BarGraphController
*/
public void analyse_Button() {
replaceSceneContent(SceneCode.ROUTE_ANALYSER);

@ -56,7 +56,7 @@ public class Map {
});
}
public Map(WebView webView, final RoutePath newRoute, TableView table){
public Map(WebView webView, final RoutePath newRoute, final TableView table){
this.webView = webView;
webEngine = webView.getEngine();
initMap();

@ -8,7 +8,7 @@
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.text.Font?>
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="568.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.45" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.AirportAnalyser">
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="568.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.45" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.PieGraphController">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />

@ -0,0 +1,68 @@
<?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.scene.web.*?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<?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" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.AnalyserController">
<children>
<ScrollPane prefHeight="800.0" prefWidth="800.0">
<content>
<AnchorPane prefHeight="800.0" prefWidth="800.0">
<children>
<HBox alignment="CENTER" prefHeight="300.0" prefWidth="583.0" AnchorPane.topAnchor="25.0">
<children>
<AnchorPane prefHeight="300.0" prefWidth="330.0">
<children>
<Pane layoutY="-6.0" prefHeight="60.0" prefWidth="330.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<Text layoutX="21.0" layoutY="40.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Analyse Data">
<font>
<Font size="29.0" />
</font>
</Text>
</children>
</Pane>
<Button layoutX="165.0" layoutY="125.0" mnemonicParsing="false" onAction="#barGraphButton" text="Bar Graph" />
</children>
</AnchorPane>
<AnchorPane prefHeight="300.0" prefWidth="253.0">
<children>
<Pane layoutY="200.0" prefHeight="100.0" prefWidth="253.0">
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</Pane>
<Pane prefHeight="200.0" prefWidth="253.0">
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
<children>
<Button layoutX="191.0" layoutY="124.0" mnemonicParsing="false" onAction="#pieGraphButton" text="Pie Graph" />
</children>
</Pane>
</children>
</AnchorPane>
</children>
</HBox>
</children>
</AnchorPane>
</content>
</ScrollPane>
</children>
</VBox>

@ -0,0 +1,72 @@
<?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.ChoiceBox?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.BarChooserController">
<children>
<ScrollPane prefHeight="800.0" prefWidth="800.0">
<content>
<AnchorPane prefHeight="800.0" prefWidth="800.0">
<children>
<HBox alignment="CENTER" prefHeight="300.0" prefWidth="583.0" AnchorPane.topAnchor="25.0">
<children>
<AnchorPane prefHeight="300.0" prefWidth="330.0">
<children>
<Pane layoutY="-6.0" prefHeight="60.0" prefWidth="330.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<Text layoutX="21.0" layoutY="40.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Bar Graph">
<font>
<Font size="29.0" />
</font>
</Text>
</children>
</Pane>
<ListView fx:id="graph_against" layoutX="116.0" layoutY="150.0" prefHeight="200.0" prefWidth="200.0" />
</children>
</AnchorPane>
<AnchorPane prefHeight="300.0" prefWidth="253.0">
<children>
<Pane layoutY="200.0" prefHeight="100.0" prefWidth="253.0">
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
<children>
<ListView fx:id="graph_options" layoutX="104.0" layoutY="-50.0" prefHeight="200.0" prefWidth="200.0" />
</children>
</Pane>
<Pane prefHeight="200.0" prefWidth="253.0">
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
<children>
<ChoiceBox fx:id="datatypechooser" layoutY="14.0" prefWidth="150.0" />
</children>
</Pane>
</children>
</AnchorPane>
</children>
</HBox>
<Button layoutX="244.0" layoutY="400.0" mnemonicParsing="false" onAction="#buildGraph" text="Build Graph" />
<Button layoutX="400.0" layoutY="400.0" mnemonicParsing="false" onAction="#returnToSelection" text="Change Graph Type" />
<CheckBox fx:id="usefilter" layoutX="277.0" layoutY="449.0" mnemonicParsing="false" text="Use filters from Raw Data or here." />
</children>
</AnchorPane>
</content>
</ScrollPane>
</children>
</VBox>

@ -6,7 +6,6 @@
<?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" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.MenuController">
@ -58,6 +57,7 @@
</items></Menu>
<Menu mnemonicParsing="false" text="Analysis">
<items>
<MenuItem mnemonicParsing="false" onAction="#viewAnalyserMain" text="Graphs" />
<MenuItem mnemonicParsing="false" onAction="#veiwDistCalc" text="Calculate distance between Airports" />
</items></Menu>
<Menu mnemonicParsing="false" text="Help">

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?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 hgap="10.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="240.0" prefWidth="500.0" vgap="10.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.60" fx:controller="seng202.group9.GUI.NewPathController">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="250.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="250.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="60.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="60.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="60.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="60.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Add New Flight Path" textAlignment="CENTER" GridPane.columnSpan="2" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
<font>
<Font size="18.0" />
</font>
<GridPane.margin>
<Insets />
</GridPane.margin>
</Text>
<Label text="Source Airport ICAO Code" GridPane.rowIndex="1">
<GridPane.margin>
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
</GridPane.margin>
</Label>
<Label text="Desination Airport ICAO Code" GridPane.rowIndex="2">
<GridPane.margin>
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
</GridPane.margin>
</Label>
<TextField fx:id="sourceAirport" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<TextField fx:id="destinationAirport" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<Button fx:id="addButton" mnemonicParsing="false" onAction="#addPath" text="Add New Flight Path" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="3" />
</children>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</GridPane>

@ -0,0 +1,65 @@
<?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.CheckBox?>
<?import javafx.scene.control.ChoiceBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.PieChooserController">
<children>
<AnchorPane prefHeight="800.0" prefWidth="800.0">
<children>
<HBox alignment="CENTER" prefHeight="300.0" prefWidth="583.0" AnchorPane.topAnchor="25.0">
<children>
<AnchorPane prefHeight="300.0" prefWidth="330.0">
<children>
<Pane layoutY="-6.0" prefHeight="60.0" prefWidth="330.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<Text layoutX="21.0" layoutY="40.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Pie Graph">
<font>
<Font size="29.0" />
</font>
</Text>
</children>
</Pane>
</children>
</AnchorPane>
<AnchorPane prefHeight="300.0" prefWidth="253.0">
<children>
<Pane prefHeight="200.0" prefWidth="253.0">
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
<children>
<ChoiceBox fx:id="datatypechooser" layoutY="14.0" prefWidth="150.0" />
<Label layoutX="-6.0" layoutY="120.0" text="Values to be Graphed." />
<Label layoutX="15.0" layoutY="-7.0" text="Data Type Used" />
</children>
</Pane>
<ListView fx:id="graph_options" layoutY="155.0" prefHeight="200.0" prefWidth="200.0" />
</children>
</AnchorPane>
</children>
</HBox>
<Button layoutX="234.0" layoutY="413.0" mnemonicParsing="false" onAction="#buildGraph" text="Build Graph" />
<Button layoutX="346.0" layoutY="413.0" mnemonicParsing="false" onAction="#newFilter" text="New Filter" />
<Button layoutX="462.0" layoutY="413.0" mnemonicParsing="false" onAction="#toBarGraphChooser" text="Change Graph Type" />
<CheckBox fx:id="usefilter" layoutX="356.0" layoutY="464.0" mnemonicParsing="false" text="Use filters from Raw Data" />
</children>
</AnchorPane>
</children>
</VBox>

@ -10,7 +10,7 @@
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.text.Font?>
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="568.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.45" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.RouteAnalyser">
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="568.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.45" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.BarGraphController">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.45" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.BarChartErrorController">
<children>
<ScrollPane prefHeight="800.0" prefWidth="800.0">
<content>
<AnchorPane prefHeight="800.0" prefWidth="800.0">
<children>
<HBox alignment="CENTER" prefHeight="300.0" prefWidth="583.0" AnchorPane.topAnchor="25.0">
<children>
<AnchorPane prefHeight="300.0" prefWidth="330.0">
<children>
<Pane layoutY="-6.0" prefHeight="60.0" prefWidth="330.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<Text layoutX="21.0" layoutY="40.0" strokeType="OUTSIDE" strokeWidth="0.0" text="You have entered too many options for our graph to safely handle. ">
<font>
<Font size="24.0" />
</font></Text>
</children>
</Pane>
<Button layoutX="100.0" layoutY="125.0" mnemonicParsing="false" onAction="#ignoredWarning" text="Continue? (May cause slowdown and display issues" />
</children>
</AnchorPane>
<AnchorPane prefHeight="300.0" prefWidth="253.0">
<children>
<Pane layoutY="200.0" prefHeight="100.0" prefWidth="253.0">
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</Pane>
<Pane prefHeight="200.0" prefWidth="253.0">
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
<children>
<Button layoutX="100.0" layoutY="124.0" mnemonicParsing="false" onAction="#backToSafety" text="Abort (Add more filters to fix.)" />
</children>
</Pane>
</children>
</AnchorPane>
</children>
</HBox>
</children>
</AnchorPane>
</content>
</ScrollPane>
</children>
</VBox>

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.45" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.PieChartErrorController">
<children>
<ScrollPane prefHeight="800.0" prefWidth="800.0">
<content>
<AnchorPane prefHeight="800.0" prefWidth="800.0">
<children>
<HBox alignment="CENTER" prefHeight="300.0" prefWidth="583.0" AnchorPane.topAnchor="25.0">
<children>
<AnchorPane prefHeight="300.0" prefWidth="330.0">
<children>
<Pane layoutY="-6.0" prefHeight="60.0" prefWidth="330.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<Text layoutX="21.0" layoutY="40.0" strokeType="OUTSIDE" strokeWidth="0.0" text="You have entered too many options for our graph to safely handle. ">
<font>
<Font size="24.0" />
</font></Text>
</children>
</Pane>
<Button layoutX="100.0" layoutY="125.0" mnemonicParsing="false" onAction="#ignoredWarning" text="Continue? (May cause slowdown and display issues" />
</children>
</AnchorPane>
<AnchorPane prefHeight="300.0" prefWidth="253.0">
<children>
<Pane layoutY="200.0" prefHeight="100.0" prefWidth="253.0">
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</Pane>
<Pane prefHeight="200.0" prefWidth="253.0">
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
<children>
<Button layoutX="100.0" layoutY="124.0" mnemonicParsing="false" onAction="#backToSafety" text="Abort (Add more filters to fix.)" />
</children>
</Pane>
</children>
</AnchorPane>
</children>
</HBox>
</children>
</AnchorPane>
</content>
</ScrollPane>
</children>
</VBox>
Loading…
Cancel
Save