Initial commit deleted all of the previous. Refactored Session Filter variables from <index, string> to <index, id>
parent
6abea16a99
commit
1b620810cb
@ -0,0 +1,18 @@
|
||||
package seng202.group9.GUI;
|
||||
|
||||
import seng202.group9.Controller.SceneCode;
|
||||
|
||||
/**
|
||||
* Created by Gondr on 2/10/2016.
|
||||
*/
|
||||
public class AirlineGraphController extends Controller{
|
||||
|
||||
@Override
|
||||
public void load() {
|
||||
|
||||
}
|
||||
|
||||
public void goToRawData(){
|
||||
replaceSceneContent(SceneCode.AIRLINE_RAW_DATA);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
package seng202.group9.GUI;
|
||||
|
||||
/**
|
||||
* Created by Gondr on 2/10/2016.
|
||||
*/
|
||||
public class AirportGraphController {
|
||||
}
|
||||
@ -1,19 +0,0 @@
|
||||
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() {}
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -1,79 +0,0 @@
|
||||
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.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);
|
||||
}
|
||||
}
|
||||
@ -1,150 +0,0 @@
|
||||
package seng202.group9.GUI;
|
||||
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.chart.BarChart;
|
||||
import javafx.scene.chart.XYChart;
|
||||
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 Session currentsession;
|
||||
private HashMap<String, Integer> stopsData = new HashMap<String, Integer>();
|
||||
private HashMap<String, Integer> codeShareData = new HashMap<String, Integer>();
|
||||
private HashMap<String, Integer> equipmentData = new HashMap<String, Integer>();
|
||||
private HashMap<String, Integer> airlineData = new HashMap<String, Integer>();
|
||||
private HashMap<String, Integer> departureAirportData = new HashMap<String, Integer>();
|
||||
private HashMap<String, Integer> arrivalAirportData = new HashMap<String, Integer>();
|
||||
|
||||
private void datasetupCustomRoute(ArrayList<Route> current_routes){
|
||||
//Takes out the specified field then adds to the used data dict.
|
||||
for (Route entry : current_routes){
|
||||
if (stopsData.containsKey(entry.getStops())){
|
||||
stopsData.replace(String.valueOf(entry.getStops()),stopsData.get(entry.getStops())+1);
|
||||
}else {
|
||||
stopsData.put(String.valueOf(entry.getStops()),1);
|
||||
}
|
||||
if (codeShareData.containsKey(entry.getCode())){
|
||||
codeShareData.replace(String.valueOf(entry.getCode()),codeShareData.get(entry.getCode())+1);
|
||||
}else {
|
||||
codeShareData.put(String.valueOf(entry.getStops()),1);
|
||||
}
|
||||
if (equipmentData.containsKey(entry.getEquipment())){
|
||||
equipmentData.replace(String.valueOf(entry.getEquipment()),equipmentData.get(entry.getEquipment())+1);
|
||||
}else {
|
||||
stopsData.put(String.valueOf(entry.getEquipment()),1);
|
||||
}
|
||||
if (airlineData.containsKey(entry.getAirlineName())){
|
||||
airlineData.replace(String.valueOf(entry.getAirlineName()), airlineData.get(entry.getAirlineName())+1);
|
||||
}else {
|
||||
airlineData.put(String.valueOf(entry.getAirline()),1);
|
||||
}
|
||||
if (departureAirportData.containsKey(entry.getDepartureAirport())){
|
||||
departureAirportData.replace(String.valueOf(entry.getDepartureAirport()),stopsData.get(entry.getDepartureAirport())+1);
|
||||
}else {
|
||||
departureAirportData.put(String.valueOf(entry.getDepartureAirport()),1);
|
||||
}
|
||||
if (arrivalAirportData.containsKey(entry.getArrivalAirport())){
|
||||
arrivalAirportData.replace(String.valueOf(entry.getArrivalAirport()),arrivalAirportData.get(entry.getArrivalAirport())+1);
|
||||
}else {
|
||||
arrivalAirportData.put(String.valueOf(entry.getArrivalAirport()),1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes data from the current dataset and places it into the displayed bar graph.
|
||||
*/
|
||||
public void buildRouteGraph(){
|
||||
XYChart.Series seriesStops = new XYChart.Series();
|
||||
XYChart.Series seriesCode = new XYChart.Series();
|
||||
XYChart.Series seriesEquipment = new XYChart.Series();
|
||||
XYChart.Series seriesAirline = new XYChart.Series();
|
||||
XYChart.Series seriesArivals = new XYChart.Series();
|
||||
XYChart.Series seriesDeparts = new XYChart.Series();
|
||||
|
||||
seriesStops.setName("Stops");
|
||||
seriesCode.setName("CodeShare");
|
||||
seriesEquipment.setName("Equipment");
|
||||
seriesAirline.setName("Airline");
|
||||
seriesArivals.setName("Arrivals");
|
||||
seriesDeparts.setName("Departures");
|
||||
//Gives the formatted data to the graph.
|
||||
analyserGraph.getData().add(seriesDeparts);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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);
|
||||
buildRouteGraph();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -1,89 +0,0 @@
|
||||
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("Airline", "Departure Airport", "Arrival Airport",
|
||||
"Codeshare", "Stops" , "Equipment");
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,223 +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 javafx.scene.control.Alert;
|
||||
import javafx.scene.control.ButtonBar;
|
||||
import javafx.scene.control.ButtonType;
|
||||
import seng202.group9.Controller.*;
|
||||
import seng202.group9.Core.Airline;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Optional;
|
||||
|
||||
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()){
|
||||
ButtonType yes = new ButtonType("Yes", ButtonBar.ButtonData.YES);
|
||||
ButtonType no = new ButtonType("No", ButtonBar.ButtonData.NO);
|
||||
Alert alert = new Alert(Alert.AlertType.CONFIRMATION, "", yes, no);
|
||||
alert.setTitle("Too many fields selected");
|
||||
alert.setHeaderText("You have selected too many fields to graph.");
|
||||
alert.setContentText("This could potentially cause errors in the program.\nDo you want to proceed?");
|
||||
//alert.showAndWait();
|
||||
Optional<ButtonType> result = alert.showAndWait();
|
||||
if (result.isPresent() && result.get() == no) {
|
||||
replaceSceneContent(SceneCode.PIE_GRAPH_CHOOSER);
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
package seng202.group9.GUI;
|
||||
|
||||
/**
|
||||
* Created by Gondr on 2/10/2016.
|
||||
*/
|
||||
public class RouteGraphController {
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
<?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.TableColumn?>
|
||||
<?import javafx.scene.control.TableView?>
|
||||
<?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?>
|
||||
<?import javafx.scene.web.WebView?>
|
||||
|
||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="568.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.AirlineGraphController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="50.0" minHeight="50.0" prefHeight="50.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="465.0" minHeight="10.0" prefHeight="465.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="118.0" minHeight="10.0" prefHeight="53.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Airline Graphs">
|
||||
<font>
|
||||
<Font size="36.0" />
|
||||
</font>
|
||||
<GridPane.margin>
|
||||
<Insets left="15.0" />
|
||||
</GridPane.margin>
|
||||
</Text>
|
||||
<Button mnemonicParsing="false" onAction="#goToRawData" prefHeight="25.0" prefWidth="100.0" text="Change Data" GridPane.halignment="LEFT" GridPane.rowIndex="2" GridPane.valignment="TOP">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||
</GridPane.margin>
|
||||
</Button>
|
||||
<ScrollPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1">
|
||||
<content>
|
||||
<GridPane fx:id="chartContainer">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
</GridPane>
|
||||
</content>
|
||||
</ScrollPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.chart.PieChart?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<?import javafx.scene.layout.RowConstraints?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="568.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.60" 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" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="457.0" minHeight="10.0" prefHeight="403.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="129.0" minHeight="10.0" prefHeight="111.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Pane prefHeight="600.0" prefWidth="800.0" GridPane.columnSpan="2" GridPane.rowSpan="2">
|
||||
<children>
|
||||
<Text layoutX="272.0" layoutY="53.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Airport Analyser">
|
||||
<font>
|
||||
<Font size="36.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<Pane layoutX="15.0" layoutY="60.0" prefHeight="403.0" prefWidth="772.0">
|
||||
<children>
|
||||
<PieChart fx:id="pieGraph" prefHeight="400.0" prefWidth="772.0" title="Airports per country" />
|
||||
</children>
|
||||
</Pane>
|
||||
</children>
|
||||
</Pane>
|
||||
</children>
|
||||
</GridPane>
|
||||
@ -0,0 +1,58 @@
|
||||
<?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.TableColumn?>
|
||||
<?import javafx.scene.control.TableView?>
|
||||
<?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?>
|
||||
<?import javafx.scene.web.WebView?>
|
||||
|
||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="568.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.AirportGraphController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="50.0" minHeight="50.0" prefHeight="50.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="465.0" minHeight="10.0" prefHeight="465.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="118.0" minHeight="10.0" prefHeight="53.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Airport Graphs">
|
||||
<font>
|
||||
<Font size="36.0" />
|
||||
</font>
|
||||
<GridPane.margin>
|
||||
<Insets left="15.0" />
|
||||
</GridPane.margin>
|
||||
</Text>
|
||||
<Button mnemonicParsing="false" onAction="#goToRawData" prefHeight="25.0" prefWidth="100.0" text="Change Data" GridPane.halignment="LEFT" GridPane.rowIndex="2" GridPane.valignment="TOP">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||
</GridPane.margin>
|
||||
</Button>
|
||||
<ScrollPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1">
|
||||
<content>
|
||||
<GridPane fx:id="chartContainer">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
</GridPane>
|
||||
</content>
|
||||
</ScrollPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
@ -1,34 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.RowConstraints?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="568.0" prefWidth="800.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.60" fx:controller="seng202.group9.GUI.AnalyserController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Button mnemonicParsing="false" onAction="#barGraphButton" prefWidth="100.0" text="Bar Graph" GridPane.halignment="CENTER" GridPane.rowIndex="2" />
|
||||
<Button mnemonicParsing="false" onAction="#pieGraphButton" prefWidth="100.0" text="Pie Graph" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" />
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Data Analysis Menu" GridPane.columnSpan="2" GridPane.halignment="CENTER" GridPane.valignment="BOTTOM">
|
||||
<font>
|
||||
<Font size="36.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Select which type of graph you wish to create:" textAlignment="CENTER" GridPane.columnSpan="2" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="BOTTOM">
|
||||
<font>
|
||||
<Font size="20.0" />
|
||||
</font>
|
||||
</Text>
|
||||
</children>
|
||||
</GridPane>
|
||||
@ -1,64 +0,0 @@
|
||||
<?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>
|
||||
</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" />
|
||||
</children>
|
||||
</Pane>
|
||||
<ListView fx:id="graph_options" layoutX="7.0" layoutY="101.0" prefHeight="199.0" prefWidth="200.0" />
|
||||
</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>
|
||||
@ -1,90 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.CheckBox?>
|
||||
<?import javafx.scene.control.ChoiceBox?>
|
||||
<?import javafx.scene.control.ListView?>
|
||||
<?import javafx.scene.control.Separator?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.RowConstraints?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="568.0" prefWidth="800.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.60" fx:controller="seng202.group9.GUI.PieChooserController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="200.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="0.0" minWidth="0.0" prefWidth="0.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="400.0" minWidth="10.0" prefWidth="200.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="200.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="100.0" minHeight="0.0" prefHeight="68.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="0.0" minHeight="0.0" prefHeight="0.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="50.0" minHeight="4.0" prefHeight="50.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="144.0" minHeight="0.0" prefHeight="160.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="474.0" minHeight="10.0" prefHeight="160.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="474.0" minHeight="10.0" prefHeight="160.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Pie Graph" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.valignment="TOP">
|
||||
<font>
|
||||
<Font size="36.0" />
|
||||
</font>
|
||||
<GridPane.margin>
|
||||
<Insets left="15.0" />
|
||||
</GridPane.margin>
|
||||
</Text>
|
||||
<ChoiceBox fx:id="datatypechooser" maxWidth="1.7976931348623157E308" GridPane.columnIndex="3" GridPane.rowIndex="3" GridPane.valignment="CENTER">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||
</GridPane.margin>
|
||||
</ChoiceBox>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Data Type to Graph" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="3" GridPane.valignment="CENTER">
|
||||
<GridPane.margin>
|
||||
<Insets left="15.0" right="15.0" />
|
||||
</GridPane.margin>
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Value to Graph" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
|
||||
<font>
|
||||
<Font size="24.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<ListView fx:id="graph_options" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="3" GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" />
|
||||
</GridPane.margin>
|
||||
</ListView>
|
||||
<CheckBox fx:id="usefilter" mnemonicParsing="false" text="Use filters from Raw Data" GridPane.columnIndex="3" GridPane.halignment="CENTER" GridPane.rowIndex="4" GridPane.valignment="CENTER">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||
</GridPane.margin>
|
||||
</CheckBox>
|
||||
<Button maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#buildGraph" text="Build Graph" GridPane.columnIndex="3" GridPane.halignment="RIGHT" GridPane.rowIndex="5" GridPane.valignment="CENTER">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||
</GridPane.margin>
|
||||
</Button>
|
||||
<Button maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#newFilter" text="Create New Filter" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="4" GridPane.valignment="CENTER">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||
</GridPane.margin>
|
||||
</Button>
|
||||
<Button maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#toBarGraphChooser" text="Change Graph Type" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="5" GridPane.valignment="CENTER">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||
</GridPane.margin>
|
||||
</Button>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Settings" GridPane.columnIndex="2" GridPane.columnSpan="2" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
|
||||
<font>
|
||||
<Font size="24.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<Separator prefWidth="200.0" GridPane.columnSpan="4" GridPane.rowIndex="1" GridPane.valignment="BOTTOM" />
|
||||
<Separator orientation="VERTICAL" prefHeight="488.0" prefWidth="6.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.rowSpan="4" GridPane.valignment="CENTER" />
|
||||
</children>
|
||||
</GridPane>
|
||||
@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.chart.BarChart?>
|
||||
<?import javafx.scene.chart.CategoryAxis?>
|
||||
<?import javafx.scene.chart.NumberAxis?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<?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.BarGraphController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="457.0" minHeight="10.0" prefHeight="403.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="457.0" minHeight="10.0" prefHeight="403.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Pane prefHeight="510.0" prefWidth="800.0" GridPane.columnSpan="2" GridPane.rowSpan="2">
|
||||
<children>
|
||||
<Label layoutX="14.0" layoutY="14.0" text="Route Analyser">
|
||||
<font>
|
||||
<Font size="29.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Pane layoutX="16.0" layoutY="53.0" prefHeight="403.0" prefWidth="765.0">
|
||||
<children>
|
||||
<BarChart fx:id="analyserGraph" prefHeight="403.0" prefWidth="740.0" title="Routes Arriving at or Departing from each Airport">
|
||||
<xAxis>
|
||||
<CategoryAxis label="Airports" side="BOTTOM" />
|
||||
</xAxis>
|
||||
<yAxis>
|
||||
<NumberAxis label="Number" side="LEFT" />
|
||||
</yAxis>
|
||||
</BarChart>
|
||||
</children>
|
||||
</Pane>
|
||||
</children>
|
||||
</Pane>
|
||||
</children>
|
||||
</GridPane>
|
||||
@ -0,0 +1,58 @@
|
||||
<?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.TableColumn?>
|
||||
<?import javafx.scene.control.TableView?>
|
||||
<?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?>
|
||||
<?import javafx.scene.web.WebView?>
|
||||
|
||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="568.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.RouteGraphController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="50.0" minHeight="50.0" prefHeight="50.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="465.0" minHeight="10.0" prefHeight="465.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="118.0" minHeight="10.0" prefHeight="53.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Route Graphs">
|
||||
<font>
|
||||
<Font size="36.0" />
|
||||
</font>
|
||||
<GridPane.margin>
|
||||
<Insets left="15.0" />
|
||||
</GridPane.margin>
|
||||
</Text>
|
||||
<Button mnemonicParsing="false" onAction="#goToRawData" prefHeight="25.0" prefWidth="100.0" text="Change Data" GridPane.halignment="LEFT" GridPane.rowIndex="2" GridPane.valignment="TOP">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||
</GridPane.margin>
|
||||
</Button>
|
||||
<ScrollPane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1">
|
||||
<content>
|
||||
<GridPane fx:id="chartContainer">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="50.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
</GridPane>
|
||||
</content>
|
||||
</ScrollPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
@ -1,58 +0,0 @@
|
||||
<?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>
|
||||
@ -1,58 +0,0 @@
|
||||
<?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