commit
c752ed969e
Binary file not shown.
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
@ -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>
|
||||
@ -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>
|
||||
@ -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…
Reference in new issue