Merge remote-tracking branch 'remotes/origin/master' into WIP_Flight_Editor
# Conflicts: # res/userdb.db # src/main/java/seng202/group9/Controller/App.java # src/main/java/seng202/group9/Controller/Dataset.java # src/main/java/seng202/group9/Controller/SceneCode.java # src/main/java/seng202/group9/Controller/Session.java # src/main/java/seng202/group9/Core/FlightPath.java
This commit is contained in:
@@ -16,6 +16,9 @@ Run java -jar seng202_2016_team9_phase2.jar
|
|||||||
Necessary Files:
|
Necessary Files:
|
||||||
/res/userdb.db
|
/res/userdb.db
|
||||||
|
|
||||||
|
To not have userdb.db clash problems run:
|
||||||
|
git update-index --assume-unchanged res/userdb.db
|
||||||
|
|
||||||
Getting started:
|
Getting started:
|
||||||
The application is shipped with all the example data files pre loaded into the database. If the user wants add more data
|
The application is shipped with all the example data files pre loaded into the database. If the user wants add more data
|
||||||
from a file then they can select a file to import using File -> Import <data> where data is the type of data you are
|
from a file then they can select a file to import using File -> Import <data> where data is the type of data you are
|
||||||
|
|||||||
Binary file not shown.
@@ -155,6 +155,10 @@ public class AirlineFilter extends Filter{
|
|||||||
return filteredList;
|
return filteredList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public ArrayList getBaseList(){
|
||||||
|
// return baseArray;
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sets a new base list of the filter.
|
* sets a new base list of the filter.
|
||||||
* @param arrayList
|
* @param arrayList
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ public class App extends Application
|
|||||||
c.close();
|
c.close();
|
||||||
} catch ( Exception e ) {
|
} catch ( Exception e ) {
|
||||||
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
|
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,10 +167,10 @@ public class App extends Application
|
|||||||
return (Initializable) loader.getController();
|
return (Initializable) loader.getController();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the current session.
|
* Gets the current session.
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Session getSession() {
|
public Session getSession() {
|
||||||
return this.session;
|
return this.session;
|
||||||
}
|
}
|
||||||
@@ -193,7 +194,7 @@ public class App extends Application
|
|||||||
/**
|
/**
|
||||||
* Sets the current Dataset to another Dataset by its index in the datasets arraylist
|
* Sets the current Dataset to another Dataset by its index in the datasets arraylist
|
||||||
* @param index
|
* @param index
|
||||||
*/
|
*/
|
||||||
public void setCurrentDataset(int index){
|
public void setCurrentDataset(int index){
|
||||||
currentDataset = datasets.get(index);
|
currentDataset = datasets.get(index);
|
||||||
}
|
}
|
||||||
@@ -201,7 +202,7 @@ public class App extends Application
|
|||||||
/**
|
/**
|
||||||
* Sets the current Dataset to another Dataset.
|
* Sets the current Dataset to another Dataset.
|
||||||
* @param dataset
|
* @param dataset
|
||||||
*/
|
*/
|
||||||
public void setCurrentDataset(Dataset dataset){
|
public void setCurrentDataset(Dataset dataset){
|
||||||
currentDataset = dataset;
|
currentDataset = dataset;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,9 @@ public enum SceneCode {
|
|||||||
AIRPORT_SUMMARY("airport_summary.fxml"), AIRPORT_RAW_DATA("airport_raw_data.fxml"),
|
AIRPORT_SUMMARY("airport_summary.fxml"), AIRPORT_RAW_DATA("airport_raw_data.fxml"),
|
||||||
ROUTE_SUMMARY("routes_summary.fxml"), ROUTE_RAW_DATA("route_raw_data.fxml"), FLIGHT_SUMMARY("flight_data_summary.fxml"),
|
ROUTE_SUMMARY("routes_summary.fxml"), ROUTE_RAW_DATA("route_raw_data.fxml"), FLIGHT_SUMMARY("flight_data_summary.fxml"),
|
||||||
FLIGHT_RAW_DATA("flight_raw_data.fxml"), AIRPORT_ANALYSER("airport_analyser.fxml"), ROUTE_ANALYSER("route_analyser.fxml"),
|
FLIGHT_RAW_DATA("flight_raw_data.fxml"), AIRPORT_ANALYSER("airport_analyser.fxml"), ROUTE_ANALYSER("route_analyser.fxml"),
|
||||||
AIRPORT_DIST_CALC("airport_dist_calc.fxml"), FLIGHT_EDITOR("flight_editor_form.fxml");
|
AIRPORT_DIST_CALC("airport_dist_calc.fxml"), AIRLINE_ADD("airline_add_form.fxml"), AIRLINE_FILTER("airline_filter_form.fxml"),
|
||||||
|
AIRPORT_ADD("airport_add_form.fxml"), AIRPORT_FILTER("airport_filter_form.fxml"), ROUTE_ADD("route_add_form.fxml"),
|
||||||
|
ROUTE_FILTER("route_filter_form.fxml"), FLIGHT_EDITOR("flight_editor_form.fxml");
|
||||||
|
|
||||||
private String filePath;
|
private String filePath;
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
package seng202.group9.Controller;
|
package seng202.group9.Controller;
|
||||||
|
|
||||||
|
import javafx.collections.ObservableList;
|
||||||
|
import seng202.group9.Core.Airline;
|
||||||
|
|
||||||
import seng202.group9.Core.FlightPoint;
|
import seng202.group9.Core.FlightPoint;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by fwy13 on 16/09/16.
|
* Created by fwy13 on 16/09/16.
|
||||||
@@ -12,6 +16,9 @@ public class Session implements Serializable {
|
|||||||
private SceneCode sceneDisplayed;
|
private SceneCode sceneDisplayed;
|
||||||
private int currentFlightPointID;
|
private int currentFlightPointID;
|
||||||
private int currentFlightPathID;
|
private int currentFlightPathID;
|
||||||
|
private HashMap<Integer, String> filteredAirlines;
|
||||||
|
private HashMap<Integer, String> filteredAirports;
|
||||||
|
private HashMap<Integer, String> filteredRoutes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for a new session
|
* Constructor for a new session
|
||||||
@@ -45,6 +52,30 @@ public class Session implements Serializable {
|
|||||||
return sceneDisplayed;
|
return sceneDisplayed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setFilteredAirlines(HashMap airlines) {
|
||||||
|
this.filteredAirlines = airlines;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap<Integer, String> getFilteredAirlines() {
|
||||||
|
return filteredAirlines;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFilteredAirports(HashMap airports) {
|
||||||
|
this.filteredAirports = airports;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap<Integer, String> getFilteredAirports() {
|
||||||
|
return filteredAirports;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFilteredRoutes(HashMap routes) {
|
||||||
|
this.filteredRoutes = routes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap<Integer, String> getFilteredRoutes() {
|
||||||
|
return filteredRoutes;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sets the current flight point
|
* sets the current flight point
|
||||||
* @param currentFlightPointID
|
* @param currentFlightPointID
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
package seng202.group9.GUI;
|
||||||
|
|
||||||
|
import javafx.collections.FXCollections;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Sunguin on 2016/09/22.
|
||||||
|
*/
|
||||||
|
public class AirlineAddController extends Controller {
|
||||||
|
//Setting up text fields for adding data
|
||||||
|
@FXML
|
||||||
|
private TextField airlNameAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField airlAliasAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField airlIATAAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField airlICAOAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField airlCallsignAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField airlCountryAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField airlActiveAdd;
|
||||||
|
@FXML
|
||||||
|
private Button addButton;
|
||||||
|
|
||||||
|
private Dataset theDataSet = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a single airline entry to the database.
|
||||||
|
* Takes in values from the GUI the user has typed in.
|
||||||
|
* @see Dataset
|
||||||
|
*/
|
||||||
|
public void addAirlineSingle() {
|
||||||
|
//Tries to add a new airline and clears the fields to their initial state if successful.
|
||||||
|
//Otherwise an error message will pop up with what is wrong with the manual data.
|
||||||
|
|
||||||
|
try {
|
||||||
|
theDataSet.addAirline(
|
||||||
|
airlNameAdd.getText(),
|
||||||
|
airlAliasAdd.getText(),
|
||||||
|
airlIATAAdd.getText(),
|
||||||
|
airlICAOAdd.getText(),
|
||||||
|
airlCallsignAdd.getText(),
|
||||||
|
airlCountryAdd.getText(),
|
||||||
|
airlActiveAdd.getText());
|
||||||
|
airlNameAdd.clear();
|
||||||
|
airlAliasAdd.clear();
|
||||||
|
airlIATAAdd.clear();
|
||||||
|
airlICAOAdd.clear();
|
||||||
|
airlCallsignAdd.clear();
|
||||||
|
airlCountryAdd.clear();
|
||||||
|
airlActiveAdd.clear();
|
||||||
|
|
||||||
|
Alert alert = new Alert(Alert.AlertType.INFORMATION);
|
||||||
|
alert.setTitle("Airline Add Successful");
|
||||||
|
alert.setHeaderText("New Airline added!");
|
||||||
|
alert.setContentText("Your new airline has been successfully added into the database.");
|
||||||
|
alert.showAndWait();
|
||||||
|
|
||||||
|
Stage stage = (Stage) addButton.getScene().getWindow();
|
||||||
|
stage.close();
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
Alert alert = new Alert(Alert.AlertType.ERROR);
|
||||||
|
alert.setTitle("Airline Data Error");
|
||||||
|
alert.setHeaderText("Error adding a custom airline entry.");
|
||||||
|
alert.setContentText(e.getMessage());
|
||||||
|
alert.showAndWait();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void load() {
|
||||||
|
theDataSet = getParent().getCurrentDataset();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
package seng202.group9.GUI;
|
||||||
|
|
||||||
|
import javafx.collections.FXCollections;
|
||||||
|
import javafx.collections.ObservableList;
|
||||||
|
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.AirlineFilter;
|
||||||
|
import seng202.group9.Controller.Dataset;
|
||||||
|
import seng202.group9.Controller.Session;
|
||||||
|
import seng202.group9.Core.Airline;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Sunguin on 2016/09/22.
|
||||||
|
*/
|
||||||
|
public class AirlineFilterController extends Controller {
|
||||||
|
|
||||||
|
//Setting up text fields for filtering data
|
||||||
|
@FXML
|
||||||
|
private TextField airlNameFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField airlAliasFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField airlIATAFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField airlICAOFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField airlCallsignFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField airlCountryFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField airlActiveFilter;
|
||||||
|
@FXML
|
||||||
|
private Button applyButton;
|
||||||
|
|
||||||
|
private Dataset theDataSet = null;
|
||||||
|
private Session currentSession = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filters airlines by any field.
|
||||||
|
* These are specified by what the user has typed in the filter boxes.
|
||||||
|
* Updates the GUI accordingly.
|
||||||
|
* @see AirlineFilter
|
||||||
|
*/
|
||||||
|
public void filterAirlines() {
|
||||||
|
//The filter function also operates like a search function
|
||||||
|
AirlineFilter filter = new AirlineFilter(theDataSet.getAirlines());
|
||||||
|
if (airlNameFilter.getText() != null) {
|
||||||
|
filter.filterName(airlNameFilter.getText());
|
||||||
|
}
|
||||||
|
if (airlAliasFilter.getText() != null) {
|
||||||
|
filter.filterAlias(airlAliasFilter.getText());
|
||||||
|
}
|
||||||
|
if (airlIATAFilter.getText() != null) {
|
||||||
|
filter.filterIATA(airlIATAFilter.getText());
|
||||||
|
}
|
||||||
|
if (airlICAOFilter.getText() != null) {
|
||||||
|
filter.filterICAO(airlICAOFilter.getText());
|
||||||
|
}
|
||||||
|
if (airlCallsignFilter.getText() != null) {
|
||||||
|
filter.filterCallsign(airlCallsignFilter.getText());
|
||||||
|
}
|
||||||
|
if (airlCountryFilter.getText() != null) {
|
||||||
|
filter.filterCountry(airlCountryFilter.getText());
|
||||||
|
}
|
||||||
|
if (airlActiveFilter.getText() != null) {
|
||||||
|
filter.filterActive(airlActiveFilter.getText());
|
||||||
|
}
|
||||||
|
|
||||||
|
Alert alert = new Alert(Alert.AlertType.INFORMATION);
|
||||||
|
alert.setTitle("Airline Filter Successful");
|
||||||
|
alert.setHeaderText("Airline data filtered!");
|
||||||
|
alert.setContentText("Your airline data has been successfully filtered.");
|
||||||
|
alert.showAndWait();
|
||||||
|
|
||||||
|
//currentSession.setFilteredAirlines(FXCollections.observableArrayList(filter.getFilteredData()));
|
||||||
|
|
||||||
|
HashMap<Integer, String> airlinesHM = new HashMap<Integer, String>();
|
||||||
|
ArrayList<Airline> airlines = filter.getFilteredData();
|
||||||
|
//for (Airline airline: airlines) {
|
||||||
|
for (int index = 0; index < airlines.size(); index++) {
|
||||||
|
airlinesHM.put(index, airlines.get(index).getName());
|
||||||
|
}
|
||||||
|
currentSession.setFilteredAirlines(airlinesHM);
|
||||||
|
|
||||||
|
Stage stage = (Stage) applyButton.getScene().getWindow();
|
||||||
|
stage.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void load() {
|
||||||
|
theDataSet = getParent().getCurrentDataset();
|
||||||
|
currentSession = getParent().getSession();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,14 +1,17 @@
|
|||||||
package seng202.group9.GUI;
|
package seng202.group9.GUI;
|
||||||
|
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
|
import javafx.collections.ObservableList;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.scene.control.*;
|
import javafx.scene.control.*;
|
||||||
import javafx.scene.control.cell.PropertyValueFactory;
|
import javafx.scene.control.cell.PropertyValueFactory;
|
||||||
import seng202.group9.Controller.AirlineFilter;
|
import seng202.group9.Controller.*;
|
||||||
import seng202.group9.Controller.Dataset;
|
|
||||||
import seng202.group9.Core.Airline;
|
import seng202.group9.Core.Airline;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The GUI controller class for airline_raw_data.fxml.
|
* The GUI controller class for airline_raw_data.fxml.
|
||||||
@@ -20,56 +23,26 @@ public class AirlineRDController extends Controller {
|
|||||||
@FXML
|
@FXML
|
||||||
private TableView<Airline> tableViewAirlineRD;
|
private TableView<Airline> tableViewAirlineRD;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airline, String> airlIDcol;
|
private TableColumn<Airline, String> airlIDCol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airline, String> airlNamecol;
|
private TableColumn<Airline, String> airlNameCol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airline, String> airlAliascol;
|
private TableColumn<Airline, String> airlAliasCol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airline, String> airlIATAcol;
|
private TableColumn<Airline, String> airlIATACol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airline, String> airlICAOcol;
|
private TableColumn<Airline, String> airlICAOCol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airline, String> airlCallsigncol;
|
private TableColumn<Airline, String> airlCallsignCol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airline, String> airlCountrycol;
|
private TableColumn<Airline, String> airlCountryCol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airline, String> airlActivecol;
|
private TableColumn<Airline, String> airlActiveCol;
|
||||||
|
|
||||||
//Setting up text fields for adding data
|
//Set an empty Dataset to be assigned to the current dataset.
|
||||||
@FXML
|
|
||||||
private TextField airlNameBox;
|
|
||||||
@FXML
|
|
||||||
private TextField airlAliasBox;
|
|
||||||
@FXML
|
|
||||||
private TextField airlIATABox;
|
|
||||||
@FXML
|
|
||||||
private TextField airlICAOBox;
|
|
||||||
@FXML
|
|
||||||
private TextField airlCallsignBox;
|
|
||||||
@FXML
|
|
||||||
private TextField airlCountryBox;
|
|
||||||
@FXML
|
|
||||||
private ComboBox<String> airlActiveCBox;
|
|
||||||
|
|
||||||
//Setting up text fields for filtering data
|
|
||||||
@FXML
|
|
||||||
private TextField airlNameFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField airlAliasFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField airlIATAFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField airlICAOFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField airlCallsignFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField airlCountryFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField airlActiveFilter;
|
|
||||||
|
|
||||||
//Set an empty Dataset to be assigned later.
|
|
||||||
private Dataset theDataSet = null;
|
private Dataset theDataSet = null;
|
||||||
|
//Set an empty session to be assigned to the current session.
|
||||||
|
private Session currentSession = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads the initial airline data to the GUI table.
|
* Loads the initial airline data to the GUI table.
|
||||||
@@ -77,59 +50,48 @@ public class AirlineRDController extends Controller {
|
|||||||
*/
|
*/
|
||||||
public void load() {
|
public void load() {
|
||||||
//Sets up the table columns to be ready for use for Airline data
|
//Sets up the table columns to be ready for use for Airline data
|
||||||
airlIDcol.setCellValueFactory(new PropertyValueFactory<Airline, String>("ID"));
|
airlIDCol.setCellValueFactory(new PropertyValueFactory<Airline, String>("ID"));
|
||||||
airlNamecol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Name"));
|
airlNameCol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Name"));
|
||||||
airlAliascol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Alias"));
|
airlAliasCol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Alias"));
|
||||||
airlIATAcol.setCellValueFactory(new PropertyValueFactory<Airline, String>("IATA"));
|
airlIATACol.setCellValueFactory(new PropertyValueFactory<Airline, String>("IATA"));
|
||||||
airlICAOcol.setCellValueFactory(new PropertyValueFactory<Airline, String>("ICAO"));
|
airlICAOCol.setCellValueFactory(new PropertyValueFactory<Airline, String>("ICAO"));
|
||||||
airlCallsigncol.setCellValueFactory(new PropertyValueFactory<Airline, String>("CallSign"));
|
airlCallsignCol.setCellValueFactory(new PropertyValueFactory<Airline, String>("CallSign"));
|
||||||
airlCountrycol.setCellValueFactory(new PropertyValueFactory<Airline, String>("CountryName"));
|
airlCountryCol.setCellValueFactory(new PropertyValueFactory<Airline, String>("CountryName"));
|
||||||
airlActivecol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Active"));
|
airlActiveCol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Active"));
|
||||||
|
|
||||||
//Assigning the Dataset to the current Dataset's airlines and displaying it in a table
|
//Assigning the Dataset to the current Dataset's airlines and displaying it in a table
|
||||||
theDataSet = getParent().getCurrentDataset();
|
theDataSet = getParent().getCurrentDataset();
|
||||||
tableViewAirlineRD.setItems(FXCollections.observableArrayList(theDataSet.getAirlines()));
|
currentSession = getParent().getSession();
|
||||||
|
|
||||||
//Initializes the value for the drop-down menu for Active for adding a new Airline
|
tableViewAirlineRD.setItems(FXCollections.observableArrayList(theDataSet.getAirlines()));
|
||||||
airlActiveCBox.setValue("Y");
|
tableViewAirlineRD.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
|
||||||
airlActiveCBox.getItems().addAll("Y", "N");
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Opens the Airline add form.
|
||||||
|
*/
|
||||||
|
public void openAdd() {
|
||||||
|
createPopUpStage(SceneCode.AIRLINE_ADD, 600, 370);
|
||||||
|
tableViewAirlineRD.setItems(FXCollections.observableArrayList(theDataSet.getAirlines()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a single airline entry to the database.
|
* Opens the Airline Filter form.
|
||||||
* Takes in values from the GUI the user has typed in.
|
|
||||||
* @see Dataset
|
|
||||||
*/
|
*/
|
||||||
public void addAirlineSingle() {
|
public void openFilter() {
|
||||||
//Tries to add a new airline and clears the fields to their initial state if successful.
|
createPopUpStage(SceneCode.AIRLINE_FILTER, 600, 370);
|
||||||
//Otherwise an error message will pop up with what is wrong with the manual data.
|
ArrayList<Airline> d = new ArrayList();
|
||||||
try {
|
for(int i = 0; i < theDataSet.getAirlines().size(); i++) {
|
||||||
theDataSet.addAirline(
|
if (currentSession.getFilteredAirlines().containsValue(theDataSet.getAirlines().get(i).getName())
|
||||||
airlNameBox.getText(),
|
&& currentSession.getFilteredAirlines().containsKey(i)) {
|
||||||
airlAliasBox.getText(),
|
d.add(theDataSet.getAirlines().get(i));
|
||||||
airlIATABox.getText(),
|
}
|
||||||
airlICAOBox.getText(),
|
|
||||||
airlCallsignBox.getText(),
|
|
||||||
airlCountryBox.getText(),
|
|
||||||
airlActiveCBox.getSelectionModel().getSelectedItem().toString());
|
|
||||||
airlNameBox.clear();
|
|
||||||
airlAliasBox.clear();
|
|
||||||
airlIATABox.clear();
|
|
||||||
airlICAOBox.clear();
|
|
||||||
airlCallsignBox.clear();
|
|
||||||
airlCountryBox.clear();
|
|
||||||
airlActiveCBox.getSelectionModel().clearSelection();
|
|
||||||
airlActiveCBox.setValue("Y");
|
|
||||||
tableViewAirlineRD.setItems(FXCollections.observableArrayList(theDataSet.getAirlines()));
|
|
||||||
} catch ( Exception e ) {
|
|
||||||
Alert alert = new Alert(Alert.AlertType.ERROR);
|
|
||||||
alert.setTitle("Airline Data Error");
|
|
||||||
alert.setHeaderText("Error adding a custom airline entry.");
|
|
||||||
alert.setContentText(e.getMessage());
|
|
||||||
alert.showAndWait();
|
|
||||||
}
|
}
|
||||||
|
tableViewAirlineRD.setItems(FXCollections.observableArrayList(d));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes a single selected airline entry from the database.
|
* Deletes a single selected airline entry from the database.
|
||||||
* Updates the GUI accordingly.
|
* Updates the GUI accordingly.
|
||||||
@@ -137,44 +99,23 @@ public class AirlineRDController extends Controller {
|
|||||||
*/
|
*/
|
||||||
public void deleteAirline() {
|
public void deleteAirline() {
|
||||||
//Gets an airline from the table and deletes it before updating the table
|
//Gets an airline from the table and deletes it before updating the table
|
||||||
Airline toDelete = tableViewAirlineRD.getSelectionModel().getSelectedItem();
|
ObservableList<Airline> toDelete = tableViewAirlineRD.getSelectionModel().getSelectedItems();
|
||||||
theDataSet.deleteAirline(toDelete);
|
Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
|
||||||
tableViewAirlineRD.setItems(FXCollections.observableArrayList(theDataSet.getAirlines()));
|
alert.setTitle("Airline Delete Confirmation");
|
||||||
|
alert.setHeaderText("You are about to delete some data.");
|
||||||
|
alert.setContentText("Are you sure you want to delete the selected airline(s)?");
|
||||||
|
//alert.showAndWait();
|
||||||
|
Optional<ButtonType> result = alert.showAndWait();
|
||||||
|
Airline air = null;
|
||||||
|
if (result.isPresent() && result.get() == ButtonType.OK) {
|
||||||
|
for (int i = 0; i < toDelete.size(); i++) {
|
||||||
|
air = toDelete.get(i);
|
||||||
|
theDataSet.deleteAirline(air);
|
||||||
|
}
|
||||||
|
tableViewAirlineRD.setItems(FXCollections.observableArrayList(theDataSet.getAirlines()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Filters airlines by any field.
|
|
||||||
* These are specified by what the user has typed in the filter boxes.
|
|
||||||
* Updates the GUI accordingly.
|
|
||||||
* @see AirlineFilter
|
|
||||||
*/
|
|
||||||
public void filterAirlines() {
|
|
||||||
//The filter function also operates like a search function
|
|
||||||
AirlineFilter filter = new AirlineFilter(theDataSet.getAirlines());
|
|
||||||
if (airlNameFilter.getText() != null) {
|
|
||||||
filter.filterName(airlNameFilter.getText());
|
|
||||||
}
|
|
||||||
if (airlAliasFilter.getText() != null) {
|
|
||||||
filter.filterAlias(airlAliasFilter.getText());
|
|
||||||
}
|
|
||||||
if (airlIATAFilter.getText() != null) {
|
|
||||||
filter.filterIATA(airlIATAFilter.getText());
|
|
||||||
}
|
|
||||||
if (airlICAOFilter.getText() != null) {
|
|
||||||
filter.filterICAO(airlICAOFilter.getText());
|
|
||||||
}
|
|
||||||
if (airlCallsignFilter.getText() != null) {
|
|
||||||
filter.filterCallsign(airlCallsignFilter.getText());
|
|
||||||
}
|
|
||||||
if (airlCountryFilter.getText() != null) {
|
|
||||||
filter.filterCountry(airlCountryFilter.getText());
|
|
||||||
}
|
|
||||||
if (airlActiveFilter.getText() != null) {
|
|
||||||
filter.filterActive(airlActiveFilter.getText());
|
|
||||||
}
|
|
||||||
//Sets the data according to the criteria specified by the user.
|
|
||||||
tableViewAirlineRD.setItems(FXCollections.<Airline>observableArrayList(filter.getFilteredData()));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Analyses the current data and creates a graph based on the data.
|
* Analyses the current data and creates a graph based on the data.
|
||||||
@@ -183,4 +124,8 @@ public class AirlineRDController extends Controller {
|
|||||||
public void analyse_Button() {
|
public void analyse_Button() {
|
||||||
JOptionPane.showMessageDialog(null, "This is not Implemented yet");
|
JOptionPane.showMessageDialog(null, "This is not Implemented yet");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void airlineSummaryButton() {
|
||||||
|
replaceSceneContent(SceneCode.AIRLINE_SUMMARY);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,99 @@
|
|||||||
|
package seng202.group9.GUI;
|
||||||
|
|
||||||
|
import javafx.collections.FXCollections;
|
||||||
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.scene.control.Alert;
|
||||||
|
import javafx.scene.control.ComboBox;
|
||||||
|
import javafx.scene.control.TextField;
|
||||||
|
import javafx.stage.Stage;
|
||||||
|
import seng202.group9.Controller.Dataset;
|
||||||
|
import seng202.group9.Controller.Session;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Sunguin on 2016/09/22.
|
||||||
|
*/
|
||||||
|
public class AirportAddController extends Controller {
|
||||||
|
//Setting up text fields for adding data
|
||||||
|
@FXML
|
||||||
|
private TextField airpNameAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField airpCityAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField airpCountryAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField airpIATAFAAAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField airpICAOAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField airpLatitudeAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField airpLongitudeAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField airpAltitudeAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField airpTimezoneAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField airpDSTAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField airpTzAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField addButton;
|
||||||
|
|
||||||
|
//Set an empty Dataset to be assigned later
|
||||||
|
private Dataset theDataSet = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a single airport entry in the database.
|
||||||
|
* Takes in values from the GUI the user has typed in.
|
||||||
|
* @see Dataset
|
||||||
|
*/
|
||||||
|
public void addAirportSingle() {
|
||||||
|
//Tries to add a new airport and clears the fields to their initial state if successful.
|
||||||
|
//Otherwise an error message will pop up with what is wrong with the manual data.
|
||||||
|
try {
|
||||||
|
theDataSet.addAirport(
|
||||||
|
airpNameAdd.getText(),
|
||||||
|
airpCityAdd.getText(),
|
||||||
|
airpCountryAdd.getText(),
|
||||||
|
airpIATAFAAAdd.getText(),
|
||||||
|
airpICAOAdd.getText(),
|
||||||
|
airpLatitudeAdd.getText(),
|
||||||
|
airpLongitudeAdd.getText(),
|
||||||
|
airpAltitudeAdd.getText(),
|
||||||
|
airpTimezoneAdd.getText(),
|
||||||
|
airpDSTAdd.getText(),
|
||||||
|
airpTzAdd.getText());
|
||||||
|
airpNameAdd.clear();
|
||||||
|
airpCityAdd.clear();
|
||||||
|
airpCountryAdd.clear();
|
||||||
|
airpIATAFAAAdd.clear();
|
||||||
|
airpICAOAdd.clear();
|
||||||
|
airpLatitudeAdd.clear();
|
||||||
|
airpLongitudeAdd.clear();
|
||||||
|
airpAltitudeAdd.clear();
|
||||||
|
airpTimezoneAdd.clear();
|
||||||
|
airpDSTAdd.clear();
|
||||||
|
airpTzAdd.clear();
|
||||||
|
|
||||||
|
Alert alert = new Alert(Alert.AlertType.INFORMATION);
|
||||||
|
alert.setTitle("Airport Add Successful");
|
||||||
|
alert.setHeaderText("New Airport added!");
|
||||||
|
alert.setContentText("Your new airport has been successfully added into the database.");
|
||||||
|
alert.showAndWait();
|
||||||
|
|
||||||
|
Stage stage = (Stage) addButton.getScene().getWindow();
|
||||||
|
stage.close();
|
||||||
|
|
||||||
|
} catch ( Exception e ) {
|
||||||
|
Alert alert = new Alert(Alert.AlertType.ERROR);
|
||||||
|
alert.setTitle("Airport Data Error");
|
||||||
|
alert.setHeaderText("Error adding a custom airport entry.");
|
||||||
|
alert.setContentText(e.getMessage());
|
||||||
|
alert.showAndWait();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void load() {
|
||||||
|
theDataSet = getParent().getCurrentDataset();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
package seng202.group9.GUI;
|
||||||
|
|
||||||
|
import javafx.collections.FXCollections;
|
||||||
|
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.AirportFilter;
|
||||||
|
import seng202.group9.Controller.Dataset;
|
||||||
|
import seng202.group9.Controller.Session;
|
||||||
|
import seng202.group9.Core.Airport;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Sunguin on 2016/09/22.
|
||||||
|
*/
|
||||||
|
public class AirportFilterController extends Controller {
|
||||||
|
//Setting up text fields for filtering data
|
||||||
|
@FXML
|
||||||
|
private TextField airpNameFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField airpCityFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField airpCountryFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField airpIATAFAAFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField airpICAOFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField airpLatitudeFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField airpLongitudeFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField airpAltitudeFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField airpTimezoneFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField airpDSTFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField airpTzFilter;
|
||||||
|
@FXML
|
||||||
|
private Button applyButton;
|
||||||
|
|
||||||
|
//Set an empty Dataset to be assigned later
|
||||||
|
private Dataset theDataSet = null;
|
||||||
|
//Set an empty session to be assigned to the current session.
|
||||||
|
private Session currentSession = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filters the airports table by any field.
|
||||||
|
* These are specified by what the user has typed in the filter boxes.
|
||||||
|
* Updates the GUI accordingly.
|
||||||
|
* @see AirportFilter
|
||||||
|
*/
|
||||||
|
public void filterAirports() {
|
||||||
|
//The filter function also operates like a search function
|
||||||
|
AirportFilter filter = new AirportFilter(theDataSet.getAirports());
|
||||||
|
if (airpNameFilter.getText() != null) {
|
||||||
|
filter.filterName(airpNameFilter.getText());
|
||||||
|
}
|
||||||
|
if (airpCityFilter.getText() != null) {
|
||||||
|
filter.filterCity(airpCityFilter.getText());
|
||||||
|
}
|
||||||
|
if (airpCountryFilter.getText() != null) {
|
||||||
|
filter.filterCountry(airpCountryFilter.getText());
|
||||||
|
}
|
||||||
|
if (airpIATAFAAFilter.getText() != null) {
|
||||||
|
filter.filterIATA_FFA(airpIATAFAAFilter.getText());
|
||||||
|
}
|
||||||
|
if (airpICAOFilter.getText() != null) {
|
||||||
|
filter.filterICAO(airpICAOFilter.getText());
|
||||||
|
}
|
||||||
|
if (airpLatitudeFilter.getText() != null) {
|
||||||
|
filter.filterLatitude(airpLatitudeFilter.getText());
|
||||||
|
}
|
||||||
|
if (airpLongitudeFilter.getText() != null) {
|
||||||
|
filter.filterLongitude(airpLongitudeFilter.getText());
|
||||||
|
}
|
||||||
|
if (airpAltitudeFilter.getText() != null) {
|
||||||
|
filter.filterAltitude(airpAltitudeFilter.getText());
|
||||||
|
}
|
||||||
|
if (airpTimezoneFilter.getText() != null) {
|
||||||
|
filter.filterTimezone(airpTimezoneFilter.getText());
|
||||||
|
}
|
||||||
|
if (airpDSTFilter.getText() != null) {
|
||||||
|
filter.filterDST(airpDSTFilter.getText());
|
||||||
|
}
|
||||||
|
if (airpTzFilter.getText() != null) {
|
||||||
|
filter.filterOlson(airpTzFilter.getText());
|
||||||
|
}
|
||||||
|
Alert alert = new Alert(Alert.AlertType.INFORMATION);
|
||||||
|
alert.setTitle("Airline Filter Successful");
|
||||||
|
alert.setHeaderText("Airline data filtered!");
|
||||||
|
alert.setContentText("Your airline data has been successfully filtered.");
|
||||||
|
alert.showAndWait();
|
||||||
|
|
||||||
|
//currentSession.setFilteredAirlines(FXCollections.observableArrayList(filter.getFilteredData()));
|
||||||
|
|
||||||
|
HashMap<Integer, String> airportsHM = new HashMap<Integer, String>();
|
||||||
|
ArrayList<Airport> airports = filter.getFilteredData();
|
||||||
|
for (int index = 0; index < airports.size(); index++) {
|
||||||
|
airportsHM.put(index, airports.get(index).getName());
|
||||||
|
}
|
||||||
|
currentSession.setFilteredAirports(airportsHM);
|
||||||
|
|
||||||
|
Stage stage = (Stage) applyButton.getScene().getWindow();
|
||||||
|
stage.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void load() {
|
||||||
|
theDataSet = getParent().getCurrentDataset();
|
||||||
|
currentSession = getParent().getSession();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,14 +1,19 @@
|
|||||||
package seng202.group9.GUI;
|
package seng202.group9.GUI;
|
||||||
|
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
|
import javafx.collections.ObservableList;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.scene.control.*;
|
import javafx.scene.control.*;
|
||||||
import javafx.scene.control.cell.PropertyValueFactory;
|
import javafx.scene.control.cell.PropertyValueFactory;
|
||||||
import seng202.group9.Controller.AirportFilter;
|
import seng202.group9.Controller.AirportFilter;
|
||||||
import seng202.group9.Controller.Dataset;
|
import seng202.group9.Controller.Dataset;
|
||||||
import seng202.group9.Controller.SceneCode;
|
import seng202.group9.Controller.SceneCode;
|
||||||
|
import seng202.group9.Controller.Session;
|
||||||
import seng202.group9.Core.Airport;
|
import seng202.group9.Core.Airport;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
import static javafx.collections.FXCollections.observableArrayList;
|
import static javafx.collections.FXCollections.observableArrayList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -21,80 +26,34 @@ public class AirportRDController extends Controller{
|
|||||||
@FXML
|
@FXML
|
||||||
private TableView<Airport> tableViewAirportRD;
|
private TableView<Airport> tableViewAirportRD;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airport, String> airpIDcol;
|
private TableColumn<Airport, String> airpIDCol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airport, String> airpNamecol;
|
private TableColumn<Airport, String> airpNameCol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airport, String> airpCitycol;
|
private TableColumn<Airport, String> airpCityCol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airport, String> airpCountrycol;
|
private TableColumn<Airport, String> airpCountryCol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airport, String> airpIATAFFAcol;
|
private TableColumn<Airport, String> airpIATAFFACol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airport, String> airpICAOcol;
|
private TableColumn<Airport, String> airpICAOCol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airport, String> airpLatitudecol;
|
private TableColumn<Airport, String> airpLatitudeCol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airport, String> airpLongitudecol;
|
private TableColumn<Airport, String> airpLongitudeCol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airport, String> airpAltitudecol;
|
private TableColumn<Airport, String> airpAltitudeCol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airport, String> airpTimezonecol;
|
private TableColumn<Airport, String> airpTimezoneCol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airport, String> airpDSTcol;
|
private TableColumn<Airport, String> airpDSTCol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airport, String> airpTzcol;
|
private TableColumn<Airport, String> airpTzCol;
|
||||||
|
|
||||||
//Setting up text fields for adding data
|
|
||||||
@FXML
|
|
||||||
private TextField airpNameBox;
|
|
||||||
@FXML
|
|
||||||
private TextField airpCityBox;
|
|
||||||
@FXML
|
|
||||||
private TextField airpCountryBox;
|
|
||||||
@FXML
|
|
||||||
private TextField airpIATAFFABox;
|
|
||||||
@FXML
|
|
||||||
private TextField airpICAOBox;
|
|
||||||
@FXML
|
|
||||||
private TextField airpLatitudeBox;
|
|
||||||
@FXML
|
|
||||||
private TextField airpLongitudeBox;
|
|
||||||
@FXML
|
|
||||||
private TextField airpAltitudeBox;
|
|
||||||
@FXML
|
|
||||||
private TextField airpTimezoneBox;
|
|
||||||
@FXML
|
|
||||||
private ComboBox<String> airpDSTCBox;
|
|
||||||
@FXML
|
|
||||||
private TextField airpTzBox;
|
|
||||||
|
|
||||||
//Setting up text fields for filtering data
|
|
||||||
@FXML
|
|
||||||
private TextField airpNameFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField airpCityFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField airpCountryFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField airpIATAFFAFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField airpICAOFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField airpLatitudeFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField airpLongitudeFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField airpAltitudeFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField airpTimezoneFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField airpDSTFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField airpTzFilter;
|
|
||||||
|
|
||||||
//Set an empty Dataset to be assigned later
|
//Set an empty Dataset to be assigned later
|
||||||
private Dataset theDataSet = null;
|
private Dataset theDataSet = null;
|
||||||
|
//Set an empty session to be assigned to the current session.
|
||||||
|
private Session currentSession = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads the initial airport data to the GUI table.
|
* Loads the initial airport data to the GUI table.
|
||||||
@@ -102,68 +61,42 @@ public class AirportRDController extends Controller{
|
|||||||
*/
|
*/
|
||||||
public void load() {
|
public void load() {
|
||||||
//Sets up the table columns to be ready for use for Airport data
|
//Sets up the table columns to be ready for use for Airport data
|
||||||
airpIDcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("ID"));
|
airpIDCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("ID"));
|
||||||
airpNamecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Name"));
|
airpNameCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Name"));
|
||||||
airpCitycol.setCellValueFactory(new PropertyValueFactory<Airport, String>("CityName"));
|
airpCityCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("CityName"));
|
||||||
airpCountrycol.setCellValueFactory(new PropertyValueFactory<Airport, String>("CountryName"));
|
airpCountryCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("CountryName"));
|
||||||
airpIATAFFAcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("IATA_FFA"));
|
airpIATAFFACol.setCellValueFactory(new PropertyValueFactory<Airport, String>("IATA_FFA"));
|
||||||
airpICAOcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("ICAO"));
|
airpICAOCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("ICAO"));
|
||||||
airpLatitudecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Latitude"));
|
airpLatitudeCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Latitude"));
|
||||||
airpLongitudecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Longitude"));
|
airpLongitudeCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Longitude"));
|
||||||
airpAltitudecol.setCellValueFactory(new PropertyValueFactory<Airport, String> ("Altitude"));
|
airpAltitudeCol.setCellValueFactory(new PropertyValueFactory<Airport, String> ("Altitude"));
|
||||||
airpTimezonecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Timezone"));
|
airpTimezoneCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Timezone"));
|
||||||
airpDSTcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("DST"));
|
airpDSTCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("DST"));
|
||||||
airpTzcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Tz"));
|
airpTzCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Tz"));
|
||||||
|
|
||||||
//Assigning the Dataset to the current Dataset's airports and displaying it in a table
|
//Assigning the Dataset to the current Dataset's airports and displaying it in a table
|
||||||
theDataSet = getParent().getCurrentDataset();
|
theDataSet = getParent().getCurrentDataset();
|
||||||
|
currentSession = getParent().getSession();
|
||||||
|
|
||||||
tableViewAirportRD.setItems(observableArrayList(theDataSet.getAirports()));
|
tableViewAirportRD.setItems(observableArrayList(theDataSet.getAirports()));
|
||||||
|
tableViewAirportRD.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
|
||||||
|
|
||||||
airpDSTCBox.setValue("E");//Initializes the value for the drop-down menu for DST for adding a new Airport
|
|
||||||
airpDSTCBox.getItems().addAll("E", "A", "S", "O", "Z", "N", "U");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public void openAdd() {
|
||||||
* Adds a single airport entry in the database.
|
createPopUpStage(SceneCode.AIRPORT_ADD, 600, 480);
|
||||||
* Takes in values from the GUI the user has typed in.
|
tableViewAirportRD.setItems(FXCollections.observableArrayList(theDataSet.getAirports()));
|
||||||
* @see Dataset
|
}
|
||||||
*/
|
|
||||||
public void addAirportSingle() {
|
public void openFilter() {
|
||||||
//Tries to add a new airport and clears the fields to their initial state if successful.
|
createPopUpStage(SceneCode.AIRPORT_FILTER, 600, 480);
|
||||||
//Otherwise an error message will pop up with what is wrong with the manual data.
|
ArrayList<Airport> d = new ArrayList();
|
||||||
try {
|
for(int i = 0; i < theDataSet.getAirports().size(); i++) {
|
||||||
theDataSet.addAirport(
|
if (currentSession.getFilteredAirports().containsValue(theDataSet.getAirports().get(i).getName())
|
||||||
airpNameBox.getText(),
|
&& currentSession.getFilteredAirports().containsKey(i)) {
|
||||||
airpCityBox.getText(),
|
d.add(theDataSet.getAirports().get(i));
|
||||||
airpCountryBox.getText(),
|
}
|
||||||
airpIATAFFABox.getText(),
|
|
||||||
airpICAOBox.getText(),
|
|
||||||
airpLatitudeBox.getText(),
|
|
||||||
airpLongitudeBox.getText(),
|
|
||||||
airpAltitudeBox.getText(),
|
|
||||||
airpTimezoneBox.getText(),
|
|
||||||
airpDSTCBox.getSelectionModel().getSelectedItem().toString(),
|
|
||||||
airpTzBox.getText());
|
|
||||||
airpCityBox.clear();
|
|
||||||
airpCountryBox.clear();
|
|
||||||
airpIATAFFABox.clear();
|
|
||||||
airpICAOBox.clear();
|
|
||||||
airpLatitudeBox.clear();
|
|
||||||
airpLongitudeBox.clear();
|
|
||||||
airpAltitudeBox.clear();
|
|
||||||
airpTimezoneBox.clear();
|
|
||||||
airpDSTCBox.getSelectionModel().clearSelection();
|
|
||||||
airpDSTCBox.setValue("E");
|
|
||||||
airpTzBox.clear();
|
|
||||||
tableViewAirportRD.setItems(FXCollections.observableArrayList(theDataSet.getAirports()));
|
|
||||||
} catch ( Exception e ) {
|
|
||||||
Alert alert = new Alert(Alert.AlertType.ERROR);
|
|
||||||
alert.setTitle("Airport Data Error");
|
|
||||||
alert.setHeaderText("Error adding a custom airport entry.");
|
|
||||||
alert.setContentText(e.getMessage());
|
|
||||||
alert.showAndWait();
|
|
||||||
}
|
}
|
||||||
|
tableViewAirportRD.setItems(FXCollections.observableArrayList(d));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -173,60 +106,35 @@ public class AirportRDController extends Controller{
|
|||||||
*/
|
*/
|
||||||
public void deleteAirport(){
|
public void deleteAirport(){
|
||||||
//Gets an airport from the table and deletes it before updating the table
|
//Gets an airport from the table and deletes it before updating the table
|
||||||
Airport toDelete = tableViewAirportRD.getSelectionModel().getSelectedItem();
|
// Airport toDelete = tableViewAirportRD.getSelectionModel().getSelectedItem();
|
||||||
theDataSet.deleteAirport(toDelete);
|
// theDataSet.deleteAirport(toDelete);
|
||||||
tableViewAirportRD.setItems(observableArrayList(theDataSet.getAirports()));
|
// tableViewAirportRD.setItems(observableArrayList(theDataSet.getAirports()));
|
||||||
|
|
||||||
|
ObservableList<Airport> toDelete = tableViewAirportRD.getSelectionModel().getSelectedItems();
|
||||||
|
Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
|
||||||
|
alert.setTitle("Airport Delete Confirmation");
|
||||||
|
alert.setHeaderText("You are about to delete some data.");
|
||||||
|
alert.setContentText("Are you sure you want to delete the selected airport(s)?");
|
||||||
|
//alert.showAndWait();
|
||||||
|
Optional<ButtonType> result = alert.showAndWait();
|
||||||
|
Airport air = null;
|
||||||
|
if (result.isPresent() && result.get() == ButtonType.OK) {
|
||||||
|
for (int i = 0; i < toDelete.size(); i++) {
|
||||||
|
air = toDelete.get(i);
|
||||||
|
theDataSet.deleteAirport(air);
|
||||||
|
}
|
||||||
|
tableViewAirportRD.setItems(FXCollections.observableArrayList(theDataSet.getAirports()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Filters the airports table by any field.
|
|
||||||
* These are specified by what the user has typed in the filter boxes.
|
|
||||||
* Updates the GUI accordingly.
|
|
||||||
* @see AirportFilter
|
|
||||||
*/
|
|
||||||
public void filterAirports() {
|
|
||||||
//The filter function also operates like a search function
|
|
||||||
AirportFilter filter = new AirportFilter(theDataSet.getAirports());
|
|
||||||
if (airpNameFilter.getText() != null) {
|
|
||||||
filter.filterName(airpNameFilter.getText());
|
|
||||||
}
|
|
||||||
if (airpCityFilter.getText() != null) {
|
|
||||||
filter.filterCity(airpCityFilter.getText());
|
|
||||||
}
|
|
||||||
if (airpCountryFilter.getText() != null) {
|
|
||||||
filter.filterCountry(airpCountryFilter.getText());
|
|
||||||
}
|
|
||||||
if (airpIATAFFAFilter.getText() != null) {
|
|
||||||
filter.filterIATA_FFA(airpIATAFFAFilter.getText());
|
|
||||||
}
|
|
||||||
if (airpICAOFilter.getText() != null) {
|
|
||||||
filter.filterICAO(airpICAOFilter.getText());
|
|
||||||
}
|
|
||||||
if (airpLatitudeFilter.getText() != null) {
|
|
||||||
filter.filterLatitude(airpLatitudeFilter.getText());
|
|
||||||
}
|
|
||||||
if (airpLongitudeFilter.getText() != null) {
|
|
||||||
filter.filterLongitude(airpLongitudeFilter.getText());
|
|
||||||
}
|
|
||||||
if (airpAltitudeFilter.getText() != null) {
|
|
||||||
filter.filterAltitude(airpAltitudeFilter.getText());
|
|
||||||
}
|
|
||||||
if (airpTimezoneFilter.getText() != null) {
|
|
||||||
filter.filterTimezone(airpTimezoneFilter.getText());
|
|
||||||
}
|
|
||||||
if (airpDSTFilter.getText() != null) {
|
|
||||||
filter.filterDST(airpDSTFilter.getText());
|
|
||||||
}
|
|
||||||
if (airpTzFilter.getText() != null) {
|
|
||||||
filter.filterOlson(airpTzFilter.getText());
|
|
||||||
}
|
|
||||||
//Sets the data according to the criteria specified by the user
|
|
||||||
tableViewAirportRD.setItems(FXCollections.<Airport>observableArrayList(filter.getFilteredData()));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Analyses the current data and creates a graph based on the data.
|
* Analyses the current data and creates a graph based on the data.
|
||||||
* @see AirportAnalyser
|
* @see AirportAnalyser
|
||||||
*/
|
*/
|
||||||
public void analyse_Button(){ replaceSceneContent(SceneCode.AIRPORT_ANALYSER);}
|
public void analyse_Button(){ replaceSceneContent(SceneCode.AIRPORT_ANALYSER);}
|
||||||
|
|
||||||
|
public void airportSummaryButton() {
|
||||||
|
replaceSceneContent(SceneCode.AIRPORT_SUMMARY);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package seng202.group9.GUI;
|
||||||
|
|
||||||
|
import javafx.collections.FXCollections;
|
||||||
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.scene.control.Alert;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.control.ComboBox;
|
||||||
|
import javafx.scene.control.TextField;
|
||||||
|
import javafx.stage.Stage;
|
||||||
|
import seng202.group9.Controller.Dataset;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Sunguin on 2016/09/23.
|
||||||
|
*/
|
||||||
|
public class RouteAddController extends Controller {
|
||||||
|
//Setting up text fields for adding data
|
||||||
|
@FXML
|
||||||
|
private TextField rAirlineAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField rSourceAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField rDestAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField rCodeshareAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField rStopsAdd;
|
||||||
|
@FXML
|
||||||
|
private TextField rEquipmentAdd;
|
||||||
|
@FXML
|
||||||
|
private Button addButton;
|
||||||
|
|
||||||
|
private Dataset theDataSet = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a single route entry in the database.
|
||||||
|
* Takes in values from the GUI the user has typed in.
|
||||||
|
* @see Dataset
|
||||||
|
*/
|
||||||
|
public void addRouteSingle() {
|
||||||
|
//Tries to add a new route and clears the fields to their initial state if successful.
|
||||||
|
//Otherwise an error message will pop up with what is wrong with the manual data.
|
||||||
|
try {
|
||||||
|
theDataSet.addRoute(
|
||||||
|
rAirlineAdd.getText(),
|
||||||
|
rSourceAdd.getText(),
|
||||||
|
rDestAdd.getText(),
|
||||||
|
rCodeshareAdd.getText(),
|
||||||
|
rStopsAdd.getText(),
|
||||||
|
rEquipmentAdd.getText()
|
||||||
|
);
|
||||||
|
rAirlineAdd.clear();
|
||||||
|
rSourceAdd.clear();
|
||||||
|
rDestAdd.clear();
|
||||||
|
rCodeshareAdd.clear();
|
||||||
|
rStopsAdd.clear();
|
||||||
|
rEquipmentAdd.clear();
|
||||||
|
|
||||||
|
Alert alert = new Alert(Alert.AlertType.INFORMATION);
|
||||||
|
alert.setTitle("Route Add Successful");
|
||||||
|
alert.setHeaderText("New Route added!");
|
||||||
|
alert.setContentText("Your new route has been successfully added into the database.");
|
||||||
|
alert.showAndWait();
|
||||||
|
|
||||||
|
Stage stage = (Stage) addButton.getScene().getWindow();
|
||||||
|
stage.close();
|
||||||
|
|
||||||
|
} catch ( Exception e ) {
|
||||||
|
Alert alert = new Alert(Alert.AlertType.ERROR);
|
||||||
|
alert.setTitle("Route Data Error");
|
||||||
|
alert.setHeaderText("Error adding a custom route entry.");
|
||||||
|
alert.setContentText(e.getMessage());
|
||||||
|
alert.showAndWait();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void load() {
|
||||||
|
theDataSet = getParent().getCurrentDataset();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
package seng202.group9.GUI;
|
||||||
|
|
||||||
|
import javafx.collections.FXCollections;
|
||||||
|
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.RouteFilter;
|
||||||
|
import seng202.group9.Controller.Session;
|
||||||
|
import seng202.group9.Core.Route;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Sunguin on 2016/09/23.
|
||||||
|
*/
|
||||||
|
public class RouteFilterController extends Controller {
|
||||||
|
//Setting up text fields for filtering data
|
||||||
|
@FXML
|
||||||
|
private TextField rAirlineFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField rSourceFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField rDestFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField rCodeshareFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField rStopsFilter;
|
||||||
|
@FXML
|
||||||
|
private TextField rEquipmentFilter;
|
||||||
|
@FXML
|
||||||
|
private Button applyButton;
|
||||||
|
|
||||||
|
private Dataset theDataSet = null;
|
||||||
|
//Set an empty session to be assigned to the current session.
|
||||||
|
private Session currentSession = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filters the routes table by any field.
|
||||||
|
* These are specified by what the user has typed in the filter boxes.
|
||||||
|
* Updates the GUI accordingly.
|
||||||
|
* @see RouteFilter
|
||||||
|
*/
|
||||||
|
public void filterRoutes(){
|
||||||
|
//The filter function also operates like a search function
|
||||||
|
RouteFilter filter = new RouteFilter(theDataSet.getRoutes());
|
||||||
|
if (rAirlineFilter.getText() != null) {
|
||||||
|
filter.filterAirline(rAirlineFilter.getText());
|
||||||
|
}
|
||||||
|
if (rSourceFilter.getText() != null) {
|
||||||
|
filter.filterSourceAirport(rSourceFilter.getText());
|
||||||
|
}
|
||||||
|
if (rDestFilter.getText() != null) {
|
||||||
|
filter.filterDestinationAirport(rDestFilter.getText());
|
||||||
|
}
|
||||||
|
if (rCodeshareFilter.getText() != null) {
|
||||||
|
filter.filterCodeshare(rCodeshareFilter.getText());
|
||||||
|
}
|
||||||
|
if (rStopsFilter.getText() != null) {
|
||||||
|
filter.filterDestinationStops(rStopsFilter.getText());
|
||||||
|
}
|
||||||
|
if (rEquipmentFilter.getText() != null) {
|
||||||
|
filter.filterEquipment(rEquipmentFilter.getText());
|
||||||
|
}
|
||||||
|
Alert alert = new Alert(Alert.AlertType.INFORMATION);
|
||||||
|
alert.setTitle("Route Filter Successful");
|
||||||
|
alert.setHeaderText("Route data filtered!");
|
||||||
|
alert.setContentText("Your route data has been successfully filtered.");
|
||||||
|
alert.showAndWait();
|
||||||
|
|
||||||
|
//currentSession.setFilteredAirlines(FXCollections.observableArrayList(filter.getFilteredData()));
|
||||||
|
|
||||||
|
HashMap<Integer, String> routesHM = new HashMap<Integer, String>();
|
||||||
|
ArrayList<Route> routes = filter.getFilteredData();
|
||||||
|
for (int index = 0; index < routes.size(); index++) {
|
||||||
|
routesHM.put(index, routes.get(index).getAirlineName());
|
||||||
|
}
|
||||||
|
currentSession.setFilteredRoutes(routesHM);
|
||||||
|
|
||||||
|
Stage stage = (Stage) applyButton.getScene().getWindow();
|
||||||
|
stage.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void load() {
|
||||||
|
theDataSet = getParent().getCurrentDataset();
|
||||||
|
currentSession = getParent().getSession();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,14 +1,19 @@
|
|||||||
package seng202.group9.GUI;
|
package seng202.group9.GUI;
|
||||||
|
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
|
import javafx.collections.ObservableList;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.scene.control.*;
|
import javafx.scene.control.*;
|
||||||
import javafx.scene.control.cell.PropertyValueFactory;
|
import javafx.scene.control.cell.PropertyValueFactory;
|
||||||
import seng202.group9.Controller.Dataset;
|
import seng202.group9.Controller.Dataset;
|
||||||
import seng202.group9.Controller.SceneCode;
|
import seng202.group9.Controller.SceneCode;
|
||||||
import seng202.group9.Controller.RouteFilter;
|
import seng202.group9.Controller.RouteFilter;
|
||||||
|
import seng202.group9.Controller.Session;
|
||||||
import seng202.group9.Core.Route;
|
import seng202.group9.Core.Route;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The GUI controller class for route_raw_data.fxml.
|
* The GUI controller class for route_raw_data.fxml.
|
||||||
* Extends from the abstract class {@link Controller}.
|
* Extends from the abstract class {@link Controller}.
|
||||||
@@ -37,36 +42,10 @@ public class RouteRDController extends Controller {
|
|||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Route, String> rEquipmentCol;
|
private TableColumn<Route, String> rEquipmentCol;
|
||||||
|
|
||||||
//Setting up text fields for adding data
|
|
||||||
@FXML
|
|
||||||
private TextField rAirlineBox;
|
|
||||||
@FXML
|
|
||||||
private TextField rSourceBox;
|
|
||||||
@FXML
|
|
||||||
private TextField rDestBox;
|
|
||||||
@FXML
|
|
||||||
private ComboBox<String> rCodeshareCBox;
|
|
||||||
@FXML
|
|
||||||
private TextField rStopsBox;
|
|
||||||
@FXML
|
|
||||||
private TextField rEquipmentBox;
|
|
||||||
|
|
||||||
//Setting up text fields for filtering data
|
|
||||||
@FXML
|
|
||||||
private TextField rAirlineFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField rSourceFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField rDestFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField rCodeshareFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField rStopsFilter;
|
|
||||||
@FXML
|
|
||||||
private TextField rEquipmentFilter;
|
|
||||||
|
|
||||||
//Set an empty Dataset to be assigned later
|
//Set an empty Dataset to be assigned later
|
||||||
private Dataset theDataSet = null;
|
private Dataset theDataSet = null;
|
||||||
|
//Set an empty session to be assigned to the current session.
|
||||||
|
private Session currentSession = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads the initial route data to the GUI table.
|
* Loads the initial route data to the GUI table.
|
||||||
@@ -86,45 +65,27 @@ public class RouteRDController extends Controller {
|
|||||||
|
|
||||||
//Assigning the Dataset to the current Dataset's routes and displaying it in a table
|
//Assigning the Dataset to the current Dataset's routes and displaying it in a table
|
||||||
theDataSet = getParent().getCurrentDataset();
|
theDataSet = getParent().getCurrentDataset();
|
||||||
tableViewRouteRD.setItems(FXCollections.observableArrayList(theDataSet.getRoutes()));
|
currentSession = getParent().getSession();
|
||||||
|
|
||||||
//Initializes the value for the drop-down menu for Codeshare for adding a new Route
|
tableViewRouteRD.setItems(FXCollections.observableArrayList(theDataSet.getRoutes()));
|
||||||
rCodeshareCBox.setValue("");
|
tableViewRouteRD.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
|
||||||
rCodeshareCBox.getItems().addAll("Y", "");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public void openAdd() {
|
||||||
* Adds a single route entry in the database.
|
createPopUpStage(SceneCode.ROUTE_ADD, 600, 330);
|
||||||
* Takes in values from the GUI the user has typed in.
|
tableViewRouteRD.setItems(FXCollections.observableArrayList(theDataSet.getRoutes()));
|
||||||
* @see Dataset
|
}
|
||||||
*/
|
|
||||||
public void addRouteSingle() {
|
public void openFilter() {
|
||||||
//Tries to add a new route and clears the fields to their initial state if successful.
|
createPopUpStage(SceneCode.ROUTE_FILTER, 600, 330);
|
||||||
//Otherwise an error message will pop up with what is wrong with the manual data.
|
ArrayList<Route> d = new ArrayList();
|
||||||
try {
|
for(int i = 0; i < theDataSet.getRoutes().size(); i++) {
|
||||||
theDataSet.addRoute(
|
if (currentSession.getFilteredRoutes().containsValue(theDataSet.getRoutes().get(i).getAirlineName())
|
||||||
rAirlineBox.getText(),
|
&& currentSession.getFilteredRoutes().containsKey(i)) {
|
||||||
rSourceBox.getText(),
|
d.add(theDataSet.getRoutes().get(i));
|
||||||
rDestBox.getText(),
|
}
|
||||||
rCodeshareCBox.getSelectionModel().getSelectedItem().toString(),
|
|
||||||
rStopsBox.getText(),
|
|
||||||
rEquipmentBox.getText()
|
|
||||||
);
|
|
||||||
rAirlineBox.clear();
|
|
||||||
rSourceBox.clear();
|
|
||||||
rDestBox.clear();
|
|
||||||
rCodeshareCBox.getSelectionModel().clearSelection();
|
|
||||||
rCodeshareCBox.setValue("");
|
|
||||||
rStopsBox.clear();
|
|
||||||
rEquipmentBox.clear();
|
|
||||||
tableViewRouteRD.setItems(FXCollections.observableArrayList(theDataSet.getRoutes()));
|
|
||||||
} catch ( Exception e ) {
|
|
||||||
Alert alert = new Alert(Alert.AlertType.ERROR);
|
|
||||||
alert.setTitle("Route Data Error");
|
|
||||||
alert.setHeaderText("Error adding a custom route entry.");
|
|
||||||
alert.setContentText(e.getMessage());
|
|
||||||
alert.showAndWait();
|
|
||||||
}
|
}
|
||||||
|
tableViewRouteRD.setItems(FXCollections.observableArrayList(d));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -132,43 +93,25 @@ public class RouteRDController extends Controller {
|
|||||||
* Updates the GUI accordingly.
|
* Updates the GUI accordingly.
|
||||||
* @see Dataset
|
* @see Dataset
|
||||||
*/
|
*/
|
||||||
public void deleteRoute(){
|
public void deleteRoute() {
|
||||||
//Gets a route from the table and deletes it before updating the table
|
//Gets a route from the table and deletes it before updating the table
|
||||||
Route toDelete = tableViewRouteRD.getSelectionModel().getSelectedItem();
|
ObservableList<Route> toDelete = tableViewRouteRD.getSelectionModel().getSelectedItems();
|
||||||
theDataSet.deleteRoute(toDelete);
|
Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
|
||||||
tableViewRouteRD.setItems(FXCollections.observableArrayList(theDataSet.getRoutes()));
|
alert.setTitle("Route Delete Confirmation");
|
||||||
|
alert.setHeaderText("You are about to delete some data.");
|
||||||
|
alert.setContentText("Are you sure you want to delete the selected route(s)?");
|
||||||
|
//alert.showAndWait();
|
||||||
|
Optional<ButtonType> result = alert.showAndWait();
|
||||||
|
Route air = null;
|
||||||
|
if (result.isPresent() && result.get() == ButtonType.OK) {
|
||||||
|
for (int i = 0; i < toDelete.size(); i++) {
|
||||||
|
air = toDelete.get(i);
|
||||||
|
theDataSet.deleteRoute(air);
|
||||||
|
}
|
||||||
|
tableViewRouteRD.setItems(FXCollections.observableArrayList(theDataSet.getRoutes()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Filters the routes table by any field.
|
|
||||||
* These are specified by what the user has typed in the filter boxes.
|
|
||||||
* Updates the GUI accordingly.
|
|
||||||
* @see RouteFilter
|
|
||||||
*/
|
|
||||||
public void filterRoutes(){
|
|
||||||
//The filter function also operates like a search function
|
|
||||||
RouteFilter filter = new RouteFilter(theDataSet.getRoutes());
|
|
||||||
if (rAirlineFilter.getText() != null) {
|
|
||||||
filter.filterAirline(rAirlineFilter.getText());
|
|
||||||
}
|
|
||||||
if (rSourceFilter.getText() != null) {
|
|
||||||
filter.filterSourceAirport(rSourceFilter.getText());
|
|
||||||
}
|
|
||||||
if (rDestFilter.getText() != null) {
|
|
||||||
filter.filterDestinationAirport(rDestFilter.getText());
|
|
||||||
}
|
|
||||||
if (rCodeshareFilter.getText() != null) {
|
|
||||||
filter.filterCodeshare(rCodeshareFilter.getText());
|
|
||||||
}
|
|
||||||
if (rStopsFilter.getText() != null) {
|
|
||||||
filter.filterDestinationStops(rStopsFilter.getText());
|
|
||||||
}
|
|
||||||
if (rEquipmentFilter.getText() != null) {
|
|
||||||
filter.filterEquipment(rEquipmentFilter.getText());
|
|
||||||
}
|
|
||||||
//Sets the data according to the criteria specified by the user
|
|
||||||
tableViewRouteRD.setItems(FXCollections.<Route>observableArrayList(filter.getFilteredData()));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Analyses the current data and creates a graph based on the data.
|
* Analyses the current data and creates a graph based on the data.
|
||||||
@@ -177,4 +120,9 @@ public class RouteRDController extends Controller {
|
|||||||
public void analyse_Button() {
|
public void analyse_Button() {
|
||||||
replaceSceneContent(SceneCode.ROUTE_ANALYSER);
|
replaceSceneContent(SceneCode.ROUTE_ANALYSER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void routeSummaryButton() {
|
||||||
|
replaceSceneContent(SceneCode.ROUTE_SUMMARY);
|
||||||
|
currentSession = getParent().getSession();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
<?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?>
|
||||||
|
|
||||||
|
<GridPane hgap="10.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="370.0" prefWidth="600.0" vgap="10.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.AirlineAddController">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="280.0" minWidth="10.0" prefWidth="125.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="515.0" minWidth="10.0" prefWidth="445.0" />
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="0.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="4.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
</rowConstraints>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||||
|
</padding>
|
||||||
|
<children>
|
||||||
|
<Label text="Add New Airline" GridPane.columnSpan="2" GridPane.halignment="CENTER" GridPane.valignment="TOP">
|
||||||
|
<font>
|
||||||
|
<Font size="18.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<Label text="Name*" GridPane.halignment="LEFT" GridPane.rowIndex="1">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Alias*" GridPane.halignment="LEFT" GridPane.rowIndex="2">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="IATA" GridPane.halignment="LEFT" GridPane.rowIndex="3">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="ICAO" GridPane.halignment="LEFT" GridPane.rowIndex="4">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Callsign" GridPane.halignment="LEFT" GridPane.rowIndex="5">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Country*" GridPane.halignment="LEFT" GridPane.rowIndex="6">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Active" GridPane.halignment="LEFT" GridPane.rowIndex="7">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Button fx:id="addButton" mnemonicParsing="false" onAction="#addAirlineSingle" text="Add Airline" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="8" />
|
||||||
|
<TextField fx:id="airlNameAdd" prefHeight="31.0" prefWidth="432.0" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="1" />
|
||||||
|
<TextField fx:id="airlAliasAdd" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="2" />
|
||||||
|
<TextField fx:id="airlIATAAdd" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="3" />
|
||||||
|
<TextField fx:id="airlICAOAdd" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="4" />
|
||||||
|
<TextField fx:id="airlCallsignAdd" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="5" />
|
||||||
|
<TextField fx:id="airlCountryAdd" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="6" />
|
||||||
|
<TextField fx:id="airlActiveAdd" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="7" />
|
||||||
|
<Label text="* = required field" GridPane.halignment="LEFT" GridPane.rowIndex="8">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin></Label>
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
<?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?>
|
||||||
|
|
||||||
|
<GridPane hgap="10.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="370.0" prefWidth="600.0" vgap="10.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.AirlineFilterController">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="280.0" minWidth="10.0" prefWidth="125.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="515.0" minWidth="10.0" prefWidth="445.0" />
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="0.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="4.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
</rowConstraints>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||||
|
</padding>
|
||||||
|
<children>
|
||||||
|
<Label text="Search Airlines" GridPane.columnSpan="2" GridPane.halignment="CENTER" GridPane.valignment="TOP">
|
||||||
|
<font>
|
||||||
|
<Font size="18.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<Label text="Name" GridPane.halignment="LEFT" GridPane.rowIndex="1">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Alias" GridPane.halignment="LEFT" GridPane.rowIndex="2">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="IATA" GridPane.halignment="LEFT" GridPane.rowIndex="3">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="ICAO" GridPane.halignment="LEFT" GridPane.rowIndex="4">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Callsign" GridPane.halignment="LEFT" GridPane.rowIndex="5">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Country" GridPane.halignment="LEFT" GridPane.rowIndex="6">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Active" GridPane.halignment="LEFT" GridPane.rowIndex="7">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Button fx:id="applyButton" mnemonicParsing="false" onAction="#filterAirlines" text="Apply Conditions" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="8" />
|
||||||
|
<TextField fx:id="airlNameFilter" prefHeight="31.0" prefWidth="432.0" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="1" />
|
||||||
|
<TextField fx:id="airlAliasFilter" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="2" />
|
||||||
|
<TextField fx:id="airlIATAFilter" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="3" />
|
||||||
|
<TextField fx:id="airlICAOFilter" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="4" />
|
||||||
|
<TextField fx:id="airlCallsignFilter" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="5" />
|
||||||
|
<TextField fx:id="airlCountryFilter" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="6" />
|
||||||
|
<TextField fx:id="airlActiveFilter" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="7" />
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
@@ -2,148 +2,81 @@
|
|||||||
|
|
||||||
<?import javafx.geometry.Insets?>
|
<?import javafx.geometry.Insets?>
|
||||||
<?import javafx.scene.control.Button?>
|
<?import javafx.scene.control.Button?>
|
||||||
<?import javafx.scene.control.ComboBox?>
|
|
||||||
<?import javafx.scene.control.ContextMenu?>
|
<?import javafx.scene.control.ContextMenu?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
<?import javafx.scene.control.MenuItem?>
|
<?import javafx.scene.control.MenuItem?>
|
||||||
<?import javafx.scene.control.ScrollPane?>
|
|
||||||
<?import javafx.scene.control.TableColumn?>
|
<?import javafx.scene.control.TableColumn?>
|
||||||
<?import javafx.scene.control.TableView?>
|
<?import javafx.scene.control.TableView?>
|
||||||
<?import javafx.scene.control.TextField?>
|
|
||||||
<?import javafx.scene.layout.ColumnConstraints?>
|
<?import javafx.scene.layout.ColumnConstraints?>
|
||||||
<?import javafx.scene.layout.GridPane?>
|
<?import javafx.scene.layout.GridPane?>
|
||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.HBox?>
|
||||||
<?import javafx.scene.layout.RowConstraints?>
|
<?import javafx.scene.layout.RowConstraints?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?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.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.AirlineRDController">
|
<GridPane alignment="CENTER" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="568.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.AirlineRDController">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints maxHeight="457.0" minHeight="10.0" prefHeight="403.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="50.0" minHeight="0.0" prefHeight="50.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints maxHeight="129.0" minHeight="10.0" prefHeight="111.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="450.0" minHeight="10.0" prefHeight="450.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="68.0" minHeight="0.0" prefHeight="68.0" vgrow="SOMETIMES" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<Pane prefHeight="600.0" prefWidth="800.0" GridPane.columnSpan="2" GridPane.rowSpan="2">
|
<Label text="Airline Raw Data" GridPane.halignment="LEFT" GridPane.valignment="TOP">
|
||||||
|
<font>
|
||||||
|
<Font size="36.0" />
|
||||||
|
</font>
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets left="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<TableView fx:id="tableViewAirlineRD" prefHeight="200.0" prefWidth="908.0" GridPane.columnSpan="2" GridPane.rowIndex="1">
|
||||||
|
<columns>
|
||||||
|
<TableColumn fx:id="airlIDCol" prefWidth="75.0" text="Airline ID" />
|
||||||
|
<TableColumn fx:id="airlNameCol" prefWidth="400.0" text="Name" />
|
||||||
|
<TableColumn fx:id="airlAliasCol" prefWidth="75.0" text="Alias" />
|
||||||
|
<TableColumn fx:id="airlIATACol" prefWidth="75.0" text="IATA" />
|
||||||
|
<TableColumn fx:id="airlICAOCol" prefWidth="75.0" text="ICAO" />
|
||||||
|
<TableColumn fx:id="airlCallsignCol" prefWidth="400.0" text="Callsign" />
|
||||||
|
<TableColumn fx:id="airlCountryCol" prefWidth="200.0" text="Country" />
|
||||||
|
<TableColumn fx:id="airlActiveCol" prefWidth="75.0" text="Active" />
|
||||||
|
</columns>
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
<contextMenu>
|
||||||
|
<ContextMenu>
|
||||||
|
<items>
|
||||||
|
<MenuItem mnemonicParsing="false" onAction="#deleteAirline" text="Delete" />
|
||||||
|
</items>
|
||||||
|
</ContextMenu>
|
||||||
|
</contextMenu>
|
||||||
|
</TableView>
|
||||||
|
<HBox prefHeight="100.0" prefWidth="200.0" GridPane.columnSpan="2" GridPane.halignment="RIGHT" GridPane.rowIndex="2" GridPane.valignment="BASELINE">
|
||||||
<children>
|
<children>
|
||||||
<Label layoutX="14.0" layoutY="14.0" text="Airline Raw Data">
|
<Button mnemonicParsing="false" onAction="#analyse_Button" text="Analyse Airline Data">
|
||||||
<font>
|
<HBox.margin>
|
||||||
<Font size="29.0" />
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
</font>
|
</HBox.margin>
|
||||||
</Label>
|
</Button>
|
||||||
<Button layoutX="14.0" layoutY="526.0" mnemonicParsing="false" onAction="#analyse_Button" prefHeight="25.0" prefWidth="125.0" text="Analyse" />
|
<Button mnemonicParsing="false" onAction="#openFilter" text="Filter Airline Data">
|
||||||
<Button layoutX="654.0" layoutY="526.0" mnemonicParsing="false" onAction="#addAirlineSingle" prefHeight="25.0" prefWidth="125.0" text="Add" />
|
<HBox.margin>
|
||||||
<Pane layoutX="14.0" layoutY="57.0" prefHeight="340.0" prefWidth="765.0">
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
<children>
|
</HBox.margin>
|
||||||
<TableView fx:id="tableViewAirlineRD" layoutX="1.0" prefHeight="340.0" prefWidth="765.0">
|
</Button>
|
||||||
<columns>
|
<Button mnemonicParsing="false" nodeOrientation="LEFT_TO_RIGHT" onAction="#openAdd" text="Add New Airline">
|
||||||
<TableColumn fx:id="airlIDcol" prefWidth="83.0" text="Airline ID" />
|
<HBox.margin>
|
||||||
<TableColumn fx:id="airlNamecol" prefWidth="450.0" text="Name" />
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
<TableColumn fx:id="airlAliascol" minWidth="0.0" prefWidth="56.0" text="Alias" />
|
</HBox.margin>
|
||||||
<TableColumn fx:id="airlIATAcol" minWidth="0.0" prefWidth="59.0" text="IATA" />
|
</Button>
|
||||||
<TableColumn fx:id="airlICAOcol" minWidth="0.0" prefWidth="68.0" text="ICAO" />
|
|
||||||
<TableColumn fx:id="airlCallsigncol" minWidth="0.0" prefWidth="400.0" text="Callsign" />
|
|
||||||
<TableColumn fx:id="airlCountrycol" minWidth="0.0" prefWidth="200.0" text="Country" />
|
|
||||||
<TableColumn fx:id="airlActivecol" minWidth="8.0" prefWidth="66.0" text="Active" />
|
|
||||||
</columns>
|
|
||||||
<contextMenu>
|
|
||||||
<ContextMenu>
|
|
||||||
<items>
|
|
||||||
<MenuItem mnemonicParsing="false" onAction="#deleteAirline" text="Delete" />
|
|
||||||
</items>
|
|
||||||
</ContextMenu>
|
|
||||||
</contextMenu>
|
|
||||||
</TableView>
|
|
||||||
</children>
|
|
||||||
</Pane>
|
|
||||||
<ScrollPane layoutX="14.0" layoutY="467.0" prefHeight="56.0" prefWidth="765.0">
|
|
||||||
<content>
|
|
||||||
<Pane prefHeight="37.0" prefWidth="1436.0">
|
|
||||||
<children>
|
|
||||||
<TextField fx:id="airlNameBox" layoutX="97.0" layoutY="3.0" prefHeight="31.0" prefWidth="450.0" promptText="Name">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airlAliasBox" layoutX="547.0" layoutY="3.0" prefHeight="31.0" prefWidth="56.0" promptText="Alias">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airlIATABox" layoutX="603.0" layoutY="3.0" prefHeight="31.0" prefWidth="59.0" promptText="IATA">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airlICAOBox" layoutX="662.0" layoutY="3.0" prefHeight="31.0" prefWidth="68.0" promptText="ICAO">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airlCallsignBox" layoutX="730.0" layoutY="3.0" prefHeight="31.0" prefWidth="400.0" promptText="Callsign">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airlCountryBox" layoutX="1130.0" layoutY="3.0" prefHeight="31.0" prefWidth="200.0" promptText="Country">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<Label layoutX="14.0" layoutY="6.0" prefHeight="25.0" prefWidth="84.0" text="Add Airline:" />
|
|
||||||
<ComboBox fx:id="airlActiveCBox" layoutX="1330.0" layoutY="3.0" prefHeight="31.0" prefWidth="102.0" promptText="Active" />
|
|
||||||
</children>
|
|
||||||
</Pane>
|
|
||||||
</content>
|
|
||||||
</ScrollPane>
|
|
||||||
<ScrollPane layoutX="14.0" layoutY="406.0" prefHeight="56.0" prefWidth="713.0">
|
|
||||||
<content>
|
|
||||||
<Pane prefHeight="37.0" prefWidth="1315.0">
|
|
||||||
<children>
|
|
||||||
<TextField fx:id="airlNameFilter" layoutX="57.0" layoutY="3.0" prefHeight="31.0" prefWidth="400.0" promptText="Name">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airlAliasFilter" layoutX="457.0" layoutY="3.0" prefHeight="31.0" prefWidth="56.0" promptText="Alias">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airlIATAFilter" layoutX="513.0" layoutY="3.0" prefHeight="31.0" prefWidth="59.0" promptText="IATA">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airlICAOFilter" layoutX="572.0" layoutY="3.0" prefHeight="31.0" prefWidth="68.0" promptText="ICAO">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airlCallsignFilter" layoutX="640.0" layoutY="3.0" prefHeight="31.0" prefWidth="400.0" promptText="Callsign">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airlCountryFilter" layoutX="1040.0" layoutY="3.0" prefHeight="31.0" prefWidth="200.0" promptText="Country">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<Label layoutX="10.0" layoutY="6.0" prefHeight="25.0" prefWidth="47.0" text="Filter :" />
|
|
||||||
<TextField fx:id="airlActiveFilter" layoutX="1240.0" layoutY="3.0" prefHeight="31.0" prefWidth="66.0" promptText="Active">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
</children>
|
|
||||||
</Pane>
|
|
||||||
</content>
|
|
||||||
</ScrollPane>
|
|
||||||
<Button layoutX="733.0" layoutY="416.0" mnemonicParsing="false" onAction="#filterAirlines" prefHeight="31.0" prefWidth="40.0" text="Go" />
|
|
||||||
</children>
|
</children>
|
||||||
</Pane>
|
</HBox>
|
||||||
|
<Button mnemonicParsing="false" nodeOrientation="LEFT_TO_RIGHT" onAction="#airlineSummaryButton" text="Back to Airline Summary" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="2" GridPane.valignment="TOP">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Button>
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
|
|||||||
@@ -0,0 +1,113 @@
|
|||||||
|
<?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?>
|
||||||
|
|
||||||
|
<GridPane hgap="10.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="480.0" prefWidth="600.0" vgap="10.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.AirportAddController">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="280.0" minWidth="10.0" prefWidth="125.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="515.0" minWidth="10.0" prefWidth="445.0" />
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="0.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="4.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
</rowConstraints>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||||
|
</padding>
|
||||||
|
<children>
|
||||||
|
<Label text="Add New Airport" GridPane.columnSpan="2" GridPane.halignment="CENTER" GridPane.valignment="TOP">
|
||||||
|
<font>
|
||||||
|
<Font size="18.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<Label text="Name*" GridPane.halignment="LEFT" GridPane.rowIndex="1">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="City*" GridPane.halignment="LEFT" GridPane.rowIndex="2">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Country*" GridPane.halignment="LEFT" GridPane.rowIndex="3">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="IATA/FAA" GridPane.halignment="LEFT" GridPane.rowIndex="4">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="ICAO" GridPane.halignment="LEFT" GridPane.rowIndex="5">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Latitude*" GridPane.halignment="LEFT" GridPane.rowIndex="6">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Longitude*" GridPane.halignment="LEFT" GridPane.rowIndex="7">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Button fx:id="addButton" mnemonicParsing="false" onAction="#addAirportSingle" text="Add Airport" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="12" />
|
||||||
|
<TextField fx:id="airpNameAdd" prefHeight="31.0" prefWidth="432.0" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="1" />
|
||||||
|
<TextField fx:id="airpCityAdd" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="2" />
|
||||||
|
<TextField fx:id="airpCountryAdd" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="3" />
|
||||||
|
<TextField fx:id="airpIATAFAAAdd" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="4" />
|
||||||
|
<TextField fx:id="airpICAOAdd" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="5" />
|
||||||
|
<TextField fx:id="airpLatitudeAdd" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="6" />
|
||||||
|
<Label prefHeight="21.0" prefWidth="117.0" text="* = required field" GridPane.columnSpan="2" GridPane.halignment="LEFT" GridPane.rowIndex="12">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" top="15.0" />
|
||||||
|
</GridPane.margin></Label>
|
||||||
|
<TextField fx:id="airpLongitudeAdd" GridPane.columnIndex="1" GridPane.rowIndex="7" />
|
||||||
|
<TextField fx:id="airpAltitudeAdd" GridPane.columnIndex="1" GridPane.rowIndex="8" />
|
||||||
|
<TextField fx:id="airpTimezoneAdd" GridPane.columnIndex="1" GridPane.rowIndex="9" />
|
||||||
|
<TextField fx:id="airpDSTAdd" GridPane.columnIndex="1" GridPane.rowIndex="10" />
|
||||||
|
<TextField fx:id="airpTzAdd" GridPane.columnIndex="1" GridPane.rowIndex="11" />
|
||||||
|
<Label text="Altitude*" GridPane.halignment="LEFT" GridPane.rowIndex="8">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Timezone*" GridPane.halignment="LEFT" GridPane.rowIndex="9">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="DST" GridPane.halignment="LEFT" GridPane.rowIndex="10">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Time Olson" GridPane.halignment="LEFT" GridPane.rowIndex="11">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
<?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?>
|
||||||
|
|
||||||
|
<GridPane hgap="10.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="480.0" prefWidth="600.0" vgap="10.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.AirportFilterController">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="280.0" minWidth="10.0" prefWidth="125.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="515.0" minWidth="10.0" prefWidth="445.0" />
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="0.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="4.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
</rowConstraints>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||||
|
</padding>
|
||||||
|
<children>
|
||||||
|
<Label text="Filter Airports" GridPane.columnSpan="2" GridPane.halignment="CENTER" GridPane.valignment="TOP">
|
||||||
|
<font>
|
||||||
|
<Font size="18.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<Label text="Name" GridPane.halignment="LEFT" GridPane.rowIndex="1">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="City" GridPane.halignment="LEFT" GridPane.rowIndex="2">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Country" GridPane.halignment="LEFT" GridPane.rowIndex="3">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="IATA/FAA" GridPane.halignment="LEFT" GridPane.rowIndex="4">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="ICAO" GridPane.halignment="LEFT" GridPane.rowIndex="5">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Latitude" GridPane.halignment="LEFT" GridPane.rowIndex="6">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Longitude" GridPane.halignment="LEFT" GridPane.rowIndex="7">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Button fx:id="applyButton" mnemonicParsing="false" onAction="#filterAirports" text="Filter Airports" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="12" />
|
||||||
|
<TextField fx:id="airpNameFilter" prefHeight="31.0" prefWidth="432.0" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="1" />
|
||||||
|
<TextField fx:id="airpCityFilter" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="2" />
|
||||||
|
<TextField fx:id="airpCountryFilter" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="3" />
|
||||||
|
<TextField fx:id="airpIATAFAAFilter" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="4" />
|
||||||
|
<TextField fx:id="airpICAOFilter" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="5" />
|
||||||
|
<TextField fx:id="airpLatitudeFilter" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="6" />
|
||||||
|
<TextField fx:id="airpLongitudeFilter" GridPane.columnIndex="1" GridPane.rowIndex="7" />
|
||||||
|
<TextField fx:id="airpAltitudeFilter" GridPane.columnIndex="1" GridPane.rowIndex="8" />
|
||||||
|
<TextField fx:id="airpTimezoneFilter" GridPane.columnIndex="1" GridPane.rowIndex="9" />
|
||||||
|
<TextField fx:id="airpDSTFilter" GridPane.columnIndex="1" GridPane.rowIndex="10" />
|
||||||
|
<TextField fx:id="airpTzFilter" GridPane.columnIndex="1" GridPane.rowIndex="11" />
|
||||||
|
<Label text="Altitude" GridPane.halignment="LEFT" GridPane.rowIndex="8">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Timezone" GridPane.rowIndex="9">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="DST" GridPane.rowIndex="10">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Time Olson" GridPane.rowIndex="11">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
@@ -2,191 +2,85 @@
|
|||||||
|
|
||||||
<?import javafx.geometry.Insets?>
|
<?import javafx.geometry.Insets?>
|
||||||
<?import javafx.scene.control.Button?>
|
<?import javafx.scene.control.Button?>
|
||||||
<?import javafx.scene.control.ComboBox?>
|
|
||||||
<?import javafx.scene.control.ContextMenu?>
|
<?import javafx.scene.control.ContextMenu?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
<?import javafx.scene.control.MenuItem?>
|
<?import javafx.scene.control.MenuItem?>
|
||||||
<?import javafx.scene.control.ScrollPane?>
|
|
||||||
<?import javafx.scene.control.TableColumn?>
|
<?import javafx.scene.control.TableColumn?>
|
||||||
<?import javafx.scene.control.TableView?>
|
<?import javafx.scene.control.TableView?>
|
||||||
<?import javafx.scene.control.TextField?>
|
|
||||||
<?import javafx.scene.layout.ColumnConstraints?>
|
<?import javafx.scene.layout.ColumnConstraints?>
|
||||||
<?import javafx.scene.layout.GridPane?>
|
<?import javafx.scene.layout.GridPane?>
|
||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.HBox?>
|
||||||
<?import javafx.scene.layout.RowConstraints?>
|
<?import javafx.scene.layout.RowConstraints?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?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.AirportRDController">
|
<GridPane alignment="CENTER" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="568.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.AirportRDController">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints maxHeight="457.0" minHeight="10.0" prefHeight="403.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="50.0" minHeight="0.0" prefHeight="50.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints maxHeight="129.0" minHeight="10.0" prefHeight="111.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="450.0" minHeight="10.0" prefHeight="450.0" vgrow="SOMETIMES" />
|
||||||
</rowConstraints>
|
<RowConstraints maxHeight="68.0" minHeight="0.0" prefHeight="68.0" vgrow="SOMETIMES" />
|
||||||
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<Pane prefHeight="600.0" prefWidth="800.0" GridPane.columnSpan="2" GridPane.rowSpan="2">
|
<Label text="Airport Raw Data" GridPane.halignment="LEFT" GridPane.valignment="TOP">
|
||||||
|
<font>
|
||||||
|
<Font size="36.0" />
|
||||||
|
</font>
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets left="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<TableView fx:id="tableViewAirportRD" prefHeight="200.0" prefWidth="908.0" GridPane.columnSpan="2" GridPane.rowIndex="1">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
<contextMenu>
|
||||||
|
<ContextMenu>
|
||||||
|
<items>
|
||||||
|
<MenuItem mnemonicParsing="false" onAction="#deleteAirport" text="Delete" />
|
||||||
|
</items>
|
||||||
|
</ContextMenu>
|
||||||
|
</contextMenu>
|
||||||
|
<columns>
|
||||||
|
<TableColumn fx:id="airpIDCol" prefWidth="81.00003051757812" text="Airport ID" />
|
||||||
|
<TableColumn fx:id="airpNameCol" prefWidth="350.0" text="Name" />
|
||||||
|
<TableColumn fx:id="airpCityCol" minWidth="0.0" prefWidth="200.0" text="City" />
|
||||||
|
<TableColumn fx:id="airpCountryCol" minWidth="0.0" prefWidth="200.0" text="Country" />
|
||||||
|
<TableColumn fx:id="airpIATAFFACol" minWidth="0.0" text="IATA/FAA" />
|
||||||
|
<TableColumn fx:id="airpICAOCol" minWidth="0.0" prefWidth="58.0" text="ICAO" />
|
||||||
|
<TableColumn fx:id="airpLatitudeCol" minWidth="0.0" prefWidth="100.0" text="Latitude" />
|
||||||
|
<TableColumn fx:id="airpLongitudeCol" minWidth="8.0" prefWidth="100.0" text="Longitude" />
|
||||||
|
<TableColumn fx:id="airpAltitudeCol" minWidth="0.0" prefWidth="75.0" text="Altitude" />
|
||||||
|
<TableColumn fx:id="airpTimezoneCol" minWidth="0.0" prefWidth="100.0" text="Timezone" />
|
||||||
|
<TableColumn fx:id="airpDSTCol" prefWidth="55.0" text="DST" />
|
||||||
|
<TableColumn fx:id="airpTzCol" minWidth="0.0" prefWidth="200.0" text="Tz database time zone" />
|
||||||
|
</columns>
|
||||||
|
</TableView>
|
||||||
|
<HBox prefHeight="100.0" prefWidth="200.0" GridPane.columnSpan="2" GridPane.halignment="RIGHT" GridPane.rowIndex="2" GridPane.valignment="BASELINE">
|
||||||
<children>
|
<children>
|
||||||
<Label layoutX="14.0" layoutY="14.0" text="Airport Raw Data">
|
<Button mnemonicParsing="false" onAction="#analyse_Button" text="Analyse Airport Data">
|
||||||
<font>
|
<HBox.margin>
|
||||||
<Font size="29.0" />
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
</font>
|
</HBox.margin>
|
||||||
</Label>
|
</Button>
|
||||||
<ScrollPane hbarPolicy="ALWAYS" layoutX="14.0" layoutY="469.0" prefHeight="54.0" prefViewportHeight="29.0" prefViewportWidth="1095.0" prefWidth="764.0" vbarPolicy="NEVER">
|
<Button mnemonicParsing="false" onAction="#openFilter" text="Filter Airport Data">
|
||||||
<content>
|
<HBox.margin>
|
||||||
<Pane prefHeight="39.0" prefWidth="1633.0">
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
<children>
|
</HBox.margin>
|
||||||
<TextField fx:id="airpNameBox" layoutX="89.0" layoutY="4.0" prefHeight="31.0" prefWidth="350.0" promptText="Name">
|
</Button>
|
||||||
<padding>
|
<Button mnemonicParsing="false" nodeOrientation="LEFT_TO_RIGHT" onAction="#openAdd" text="Add New Airport">
|
||||||
<Insets left="2.0" right="2.0" />
|
<HBox.margin>
|
||||||
</padding>
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
</TextField>
|
</HBox.margin>
|
||||||
<TextField fx:id="airpCityBox" layoutX="439.0" layoutY="4.0" prefHeight="31.0" prefWidth="200.0" promptText="City">
|
</Button>
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airpCountryBox" layoutX="639.0" layoutY="4.0" prefHeight="31.0" prefWidth="200.0" promptText="Country">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airpIATAFFABox" layoutX="839.0" layoutY="4.0" prefHeight="31.0" prefWidth="75.0" promptText="IATA/FAA">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airpICAOBox" layoutX="914.0" layoutY="3.0" prefHeight="31.0" prefWidth="61.0" promptText="ICAO">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airpLatitudeBox" layoutX="975.0" layoutY="3.0" prefHeight="31.0" prefWidth="100.0" promptText="Latitude">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airpLongitudeBox" layoutX="1074.0" layoutY="3.0" prefHeight="31.0" prefWidth="100.0" promptText="Longitude">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airpAltitudeBox" layoutX="1174.0" layoutY="3.0" prefHeight="31.0" prefWidth="75.0" promptText="Altitude">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airpTimezoneBox" layoutX="1249.0" layoutY="3.0" prefHeight="31.0" prefWidth="100.0" promptText="Timezone">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airpTzBox" layoutX="1432.0" layoutY="3.0" prefHeight="31.0" prefWidth="200.0" promptText="Tz database time zone">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<Label layoutX="2.0" layoutY="7.0" prefHeight="25.0" prefWidth="87.0" text="Add Airport:" />
|
|
||||||
<ComboBox fx:id="airpDSTCBox" layoutX="1349.0" layoutY="3.0" prefHeight="31.0" prefWidth="83.0" promptText="DST" />
|
|
||||||
</children>
|
|
||||||
</Pane>
|
|
||||||
</content>
|
|
||||||
</ScrollPane>
|
|
||||||
<Button layoutX="14.0" layoutY="526.0" mnemonicParsing="false" onAction="#analyse_Button" prefHeight="25.0" prefWidth="125.0" text="Analyse" />
|
|
||||||
<Button layoutX="653.0" layoutY="526.0" mnemonicParsing="false" onAction="#addAirportSingle" prefHeight="25.0" prefWidth="125.0" text="Add" />
|
|
||||||
<Pane layoutX="15.0" layoutY="60.0" prefHeight="342.0" prefWidth="764.0">
|
|
||||||
<children>
|
|
||||||
<TableView fx:id="tableViewAirportRD" prefHeight="340.0" prefWidth="765.0">
|
|
||||||
<columns>
|
|
||||||
<TableColumn fx:id="airpIDcol" prefWidth="81.00003051757812" text="Airport ID" />
|
|
||||||
<TableColumn fx:id="airpNamecol" prefWidth="350.0" text="Name" />
|
|
||||||
<TableColumn fx:id="airpCitycol" minWidth="0.0" prefWidth="200.0" text="City" />
|
|
||||||
<TableColumn fx:id="airpCountrycol" minWidth="0.0" prefWidth="200.0" text="Country" />
|
|
||||||
<TableColumn fx:id="airpIATAFFAcol" minWidth="0.0" text="IATA/FAA" />
|
|
||||||
<TableColumn fx:id="airpICAOcol" minWidth="0.0" prefWidth="58.0" text="ICAO" />
|
|
||||||
<TableColumn fx:id="airpLatitudecol" minWidth="0.0" prefWidth="100.0" text="Latitude" />
|
|
||||||
<TableColumn fx:id="airpLongitudecol" minWidth="8.0" prefWidth="100.0" text="Longitude" />
|
|
||||||
<TableColumn fx:id="airpAltitudecol" minWidth="0.0" prefWidth="75.0" text="Altitude" />
|
|
||||||
<TableColumn fx:id="airpTimezonecol" minWidth="0.0" prefWidth="100.0" text="Timezone" />
|
|
||||||
<TableColumn fx:id="airpDSTcol" prefWidth="55.0" text="DST" />
|
|
||||||
<TableColumn fx:id="airpTzcol" minWidth="0.0" prefWidth="200.0" text="Tz database time zone" />
|
|
||||||
</columns>
|
|
||||||
<contextMenu>
|
|
||||||
<ContextMenu>
|
|
||||||
<items>
|
|
||||||
<MenuItem mnemonicParsing="false" onAction="#deleteAirport" text="Delete" />
|
|
||||||
</items>
|
|
||||||
</ContextMenu>
|
|
||||||
</contextMenu>
|
|
||||||
</TableView>
|
|
||||||
</children></Pane>
|
|
||||||
<ScrollPane layoutX="15.0" layoutY="408.0" prefHeight="54.0" prefWidth="713.0">
|
|
||||||
<content>
|
|
||||||
<Pane prefHeight="32.0" prefWidth="1596.0">
|
|
||||||
<children>
|
|
||||||
<Label layoutX="14.0" layoutY="6.0" text="Filter :" />
|
|
||||||
<TextField fx:id="airpNameFilter" layoutX="64.0" layoutY="3.0" prefHeight="31.0" prefWidth="350.0" promptText="Name">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airpCityFilter" layoutX="414.0" layoutY="3.0" prefHeight="31.0" prefWidth="200.0" promptText="City">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airpCountryFilter" layoutX="614.0" layoutY="3.0" prefHeight="31.0" prefWidth="200.0" promptText="Country">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airpIATAFFAFilter" layoutX="814.0" layoutY="3.0" prefHeight="31.0" prefWidth="87.0" promptText="IATA/FAA">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airpICAOFilter" layoutX="901.0" layoutY="3.0" prefHeight="31.0" prefWidth="61.0" promptText="ICAO">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airpLatitudeFilter" layoutX="962.0" layoutY="3.0" prefHeight="31.0" prefWidth="100.0" promptText="Latitude">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airpLongitudeFilter" layoutX="1062.0" layoutY="3.0" prefHeight="31.0" prefWidth="100.0" promptText="Longitude">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airpAltitudeFilter" layoutX="1162.0" layoutY="3.0" prefHeight="31.0" prefWidth="75.0" promptText="Altitude">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airpTimezoneFilter" layoutX="1237.0" layoutY="3.0" prefHeight="31.0" prefWidth="100.0" promptText="Timezone">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airpTzFilter" layoutX="1395.0" layoutY="3.0" prefHeight="31.0" prefWidth="200.0" promptText="Tz database time zone">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airpDSTFilter" layoutX="1337.0" layoutY="3.0" prefHeight="31.0" prefWidth="58.0" promptText="DST">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
</children>
|
|
||||||
</Pane>
|
|
||||||
</content>
|
|
||||||
</ScrollPane>
|
|
||||||
<Button layoutX="735.0" layoutY="420.0" mnemonicParsing="false" onAction="#filterAirports" prefHeight="31.0" prefWidth="40.0" text="Go" />
|
|
||||||
</children>
|
</children>
|
||||||
</Pane>
|
</HBox>
|
||||||
|
<Button mnemonicParsing="false" nodeOrientation="LEFT_TO_RIGHT" onAction="#airportSummaryButton" text="Back to Airport Summary" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="2" GridPane.valignment="TOP">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Button>
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
|
|||||||
@@ -0,0 +1,78 @@
|
|||||||
|
<?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?>
|
||||||
|
|
||||||
|
<GridPane hgap="10.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="330.0" prefWidth="600.0" vgap="10.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.RouteAddController">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="280.0" minWidth="10.0" prefWidth="168.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="515.0" minWidth="10.0" prefWidth="402.0" />
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="0.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="4.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
</rowConstraints>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||||
|
</padding>
|
||||||
|
<children>
|
||||||
|
<Label text="Add New Route" GridPane.columnSpan="2" GridPane.halignment="CENTER" GridPane.valignment="TOP">
|
||||||
|
<font>
|
||||||
|
<Font size="18.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<Label text="Airline*" GridPane.halignment="LEFT" GridPane.rowIndex="1">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Source Airport*" GridPane.halignment="LEFT" GridPane.rowIndex="2">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Desintation Airport*" GridPane.halignment="LEFT" GridPane.rowIndex="3">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Codeshare" GridPane.halignment="LEFT" GridPane.rowIndex="4">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Stops" GridPane.halignment="LEFT" GridPane.rowIndex="5">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Equipment" GridPane.halignment="LEFT" GridPane.rowIndex="6">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Button fx:id="addButton" mnemonicParsing="false" onAction="#addRouteSingle" text="Add Route" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="7" />
|
||||||
|
<TextField fx:id="rAirlineAdd" prefHeight="31.0" prefWidth="432.0" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="1" />
|
||||||
|
<TextField fx:id="rSourceAdd" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="2" />
|
||||||
|
<TextField fx:id="rDestAdd" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="3" />
|
||||||
|
<TextField fx:id="rCodeshareAdd" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="4" />
|
||||||
|
<TextField fx:id="rStopsAdd" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="5" />
|
||||||
|
<TextField fx:id="rEquipmentAdd" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="6" />
|
||||||
|
<Label text="* = required field" GridPane.halignment="LEFT" GridPane.rowIndex="7">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin></Label>
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
<?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?>
|
||||||
|
|
||||||
|
<GridPane hgap="10.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="330.0" prefWidth="600.0" vgap="10.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.RouteFilterController">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="280.0" minWidth="10.0" prefWidth="168.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="515.0" minWidth="10.0" prefWidth="402.0" />
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="0.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="4.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
</rowConstraints>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||||
|
</padding>
|
||||||
|
<children>
|
||||||
|
<Label text="Filter Routes" GridPane.columnSpan="2" GridPane.halignment="CENTER" GridPane.valignment="TOP">
|
||||||
|
<font>
|
||||||
|
<Font size="18.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<Label text="Airline" GridPane.halignment="LEFT" GridPane.rowIndex="1">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Source Airport" GridPane.halignment="LEFT" GridPane.rowIndex="2">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Desintation Airport" GridPane.halignment="LEFT" GridPane.rowIndex="3">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Codeshare" GridPane.halignment="LEFT" GridPane.rowIndex="4">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Stops" GridPane.halignment="LEFT" GridPane.rowIndex="5">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label text="Equipment" GridPane.halignment="LEFT" GridPane.rowIndex="6">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Button fx:id="applyButton" mnemonicParsing="false" onAction="#filterRoutes" text="Filter Routes" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="7" />
|
||||||
|
<TextField fx:id="rAirlineFilter" prefHeight="31.0" prefWidth="432.0" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="1" />
|
||||||
|
<TextField fx:id="rSourceFilter" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="2" />
|
||||||
|
<TextField fx:id="rDestFilter" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="3" />
|
||||||
|
<TextField fx:id="rCodeshareFilter" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="4" />
|
||||||
|
<TextField fx:id="rStopsFilter" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="5" />
|
||||||
|
<TextField fx:id="rEquipmentFilter" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="6" />
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
@@ -2,108 +2,82 @@
|
|||||||
|
|
||||||
<?import javafx.geometry.Insets?>
|
<?import javafx.geometry.Insets?>
|
||||||
<?import javafx.scene.control.Button?>
|
<?import javafx.scene.control.Button?>
|
||||||
<?import javafx.scene.control.ComboBox?>
|
|
||||||
<?import javafx.scene.control.ContextMenu?>
|
<?import javafx.scene.control.ContextMenu?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
<?import javafx.scene.control.MenuItem?>
|
<?import javafx.scene.control.MenuItem?>
|
||||||
<?import javafx.scene.control.Separator?>
|
|
||||||
<?import javafx.scene.control.TableColumn?>
|
<?import javafx.scene.control.TableColumn?>
|
||||||
<?import javafx.scene.control.TableView?>
|
<?import javafx.scene.control.TableView?>
|
||||||
<?import javafx.scene.control.TextField?>
|
|
||||||
<?import javafx.scene.layout.ColumnConstraints?>
|
<?import javafx.scene.layout.ColumnConstraints?>
|
||||||
<?import javafx.scene.layout.GridPane?>
|
<?import javafx.scene.layout.GridPane?>
|
||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.HBox?>
|
||||||
<?import javafx.scene.layout.RowConstraints?>
|
<?import javafx.scene.layout.RowConstraints?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?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.RouteRDController">
|
<GridPane alignment="CENTER" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="568.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.RouteRDController">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints maxHeight="457.0" minHeight="10.0" prefHeight="403.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="50.0" minHeight="0.0" prefHeight="50.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints maxHeight="457.0" minHeight="10.0" prefHeight="403.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="450.0" minHeight="10.0" prefHeight="450.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="68.0" minHeight="0.0" prefHeight="68.0" vgrow="SOMETIMES" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<Pane prefHeight="510.0" prefWidth="800.0" GridPane.columnSpan="2" GridPane.rowSpan="2">
|
<Label text="Route Raw Data" GridPane.halignment="LEFT" GridPane.valignment="TOP">
|
||||||
|
<font>
|
||||||
|
<Font size="36.0" />
|
||||||
|
</font>
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets left="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<TableView fx:id="tableViewRouteRD" prefHeight="200.0" prefWidth="908.0" GridPane.columnSpan="2" GridPane.rowIndex="1">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
<contextMenu>
|
||||||
|
<ContextMenu>
|
||||||
|
<items>
|
||||||
|
<MenuItem mnemonicParsing="false" onAction="#deleteRoute" text="Delete" />
|
||||||
|
</items>
|
||||||
|
</ContextMenu>
|
||||||
|
</contextMenu>
|
||||||
|
<columns>
|
||||||
|
<TableColumn fx:id="rAirlineCol" prefWidth="67.0" text="Airline" />
|
||||||
|
<TableColumn fx:id="rAirlineIDCol" prefWidth="86.0" text="Airline ID" />
|
||||||
|
<TableColumn fx:id="rSourceCol" minWidth="0.0" prefWidth="124.0" text="Source airport" />
|
||||||
|
<TableColumn fx:id="rSourceIDCol" minWidth="0.0" prefWidth="141.0" text="Source airport ID" />
|
||||||
|
<TableColumn fx:id="rDestCol" minWidth="0.0" prefWidth="160.0" text="Destination airport" />
|
||||||
|
<TableColumn fx:id="rDestIDCol" minWidth="0.0" prefWidth="184.0" text="Destination airport ID" />
|
||||||
|
<TableColumn fx:id="rCodeshareCol" minWidth="0.0" prefWidth="95.0" text="Codeshare" />
|
||||||
|
<TableColumn fx:id="rStopsCol" minWidth="0.0" prefWidth="69.0" text="Stops" />
|
||||||
|
<TableColumn fx:id="rEquipmentCol" prefWidth="98.0" text="Equipment" />
|
||||||
|
</columns>
|
||||||
|
</TableView>
|
||||||
|
<HBox prefHeight="100.0" prefWidth="200.0" GridPane.columnSpan="2" GridPane.halignment="RIGHT" GridPane.rowIndex="2" GridPane.valignment="BASELINE">
|
||||||
<children>
|
<children>
|
||||||
<Label layoutX="14.0" layoutY="14.0" text="Route Raw Data">
|
<Button mnemonicParsing="false" onAction="#analyse_Button" text="Analyse Route Data">
|
||||||
<font>
|
<HBox.margin>
|
||||||
<Font size="29.0" />
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
</font>
|
</HBox.margin>
|
||||||
</Label>
|
</Button>
|
||||||
<Button layoutX="14.0" layoutY="524.0" mnemonicParsing="false" onAction="#analyse_Button" prefHeight="25.0" prefWidth="125.0" text="Analyse" />
|
<Button mnemonicParsing="false" onAction="#openFilter" text="Filter Route Data">
|
||||||
<Button layoutX="656.0" layoutY="524.0" mnemonicParsing="false" onAction="#addRouteSingle" prefHeight="25.0" prefWidth="125.0" text="Add" />
|
<HBox.margin>
|
||||||
<Pane layoutX="16.0" layoutY="53.0" prefHeight="340.0" prefWidth="765.0">
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
<children>
|
</HBox.margin>
|
||||||
<TableView fx:id="tableViewRouteRD" layoutX="-1.0" prefHeight="340.0" prefWidth="765.0">
|
</Button>
|
||||||
<columns>
|
<Button mnemonicParsing="false" nodeOrientation="LEFT_TO_RIGHT" onAction="#openAdd" text="Add New Route">
|
||||||
<TableColumn fx:id="rAirlineCol" prefWidth="67.0" text="Airline" />
|
<HBox.margin>
|
||||||
<TableColumn fx:id="rAirlineIDCol" prefWidth="86.0" text="Airline ID" />
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
<TableColumn fx:id="rSourceCol" minWidth="0.0" prefWidth="124.0" text="Source airport" />
|
</HBox.margin>
|
||||||
<TableColumn fx:id="rSourceIDCol" minWidth="0.0" prefWidth="141.0" text="Source airport ID" />
|
</Button>
|
||||||
<TableColumn fx:id="rDestCol" minWidth="0.0" prefWidth="160.0" text="Destination airport" />
|
|
||||||
<TableColumn fx:id="rDestIDCol" minWidth="0.0" prefWidth="184.0" text="Destination airport ID" />
|
|
||||||
<TableColumn fx:id="rCodeshareCol" minWidth="0.0" prefWidth="95.0" text="Codeshare" />
|
|
||||||
<TableColumn fx:id="rStopsCol" minWidth="0.0" prefWidth="69.0" text="Stops" />
|
|
||||||
<TableColumn fx:id="rEquipmentCol" prefWidth="98.0" text="Equipment" />
|
|
||||||
</columns>
|
|
||||||
<contextMenu>
|
|
||||||
<ContextMenu>
|
|
||||||
<items>
|
|
||||||
<MenuItem mnemonicParsing="false" onAction="#deleteRoute" text="Delete" />
|
|
||||||
</items>
|
|
||||||
</ContextMenu>
|
|
||||||
</contextMenu>
|
|
||||||
</TableView>
|
|
||||||
</children>
|
|
||||||
</Pane>
|
|
||||||
<Pane layoutX="14.0" layoutY="484.0" prefHeight="32.0" prefWidth="765.0">
|
|
||||||
<children>
|
|
||||||
<TextField fx:id="rAirlineBox" layoutX="90.0" layoutY="-1.0" prefHeight="31.0" prefWidth="100.0" promptText="Airline">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="rSourceBox" layoutX="190.0" layoutY="-1.0" prefHeight="31.0" prefWidth="150.0" promptText="Source airport">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="rDestBox" layoutX="340.0" layoutY="-1.0" prefHeight="31.0" prefWidth="150.0" promptText="Destination airport">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="rStopsBox" layoutX="590.0" layoutY="-1.0" prefHeight="31.0" prefWidth="75.0" promptText="Stops">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="rEquipmentBox" layoutX="665.0" layoutY="-1.0" prefHeight="31.0" prefWidth="100.0" promptText="Equipment">
|
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<Label layoutX="14.0" layoutY="4.0" text="Add Route:" />
|
|
||||||
<ComboBox fx:id="rCodeshareCBox" layoutX="490.0" layoutY="-1.0" prefHeight="31.0" prefWidth="100.0" promptText="Codeshare" />
|
|
||||||
</children>
|
|
||||||
</Pane>
|
|
||||||
<Pane layoutX="14.0" layoutY="405.0" prefHeight="45.0" prefWidth="724.0">
|
|
||||||
<children>
|
|
||||||
<Label layoutX="7.0" layoutY="12.0" text="Filter :" />
|
|
||||||
<TextField fx:id="rAirlineFilter" layoutX="55.0" layoutY="7.0" prefHeight="31.0" prefWidth="100.0" promptText="Airline" />
|
|
||||||
<TextField fx:id="rSourceFilter" layoutX="155.0" layoutY="7.0" prefHeight="31.0" prefWidth="150.0" promptText="Source airport" />
|
|
||||||
<TextField fx:id="rDestFilter" layoutX="305.0" layoutY="7.0" prefHeight="31.0" prefWidth="150.0" promptText="Destination airport" />
|
|
||||||
<TextField fx:id="rCodeshareFilter" layoutX="455.0" layoutY="7.0" prefHeight="31.0" prefWidth="89.0" promptText="Codeshare" />
|
|
||||||
<TextField fx:id="rStopsFilter" layoutX="544.0" layoutY="7.0" prefHeight="31.0" prefWidth="75.0" promptText="Stops" />
|
|
||||||
<TextField fx:id="rEquipmentFilter" layoutX="619.0" layoutY="7.0" prefHeight="31.0" prefWidth="100.0" promptText="Equipment" />
|
|
||||||
</children>
|
|
||||||
</Pane>
|
|
||||||
<Separator layoutY="464.0" prefHeight="6.0" prefWidth="800.0" />
|
|
||||||
<Button layoutX="738.0" layoutY="412.0" mnemonicParsing="false" onAction="#filterRoutes" prefHeight="31.0" prefWidth="40.0" text="Go" />
|
|
||||||
</children>
|
</children>
|
||||||
</Pane>
|
</HBox>
|
||||||
|
<Button mnemonicParsing="false" nodeOrientation="LEFT_TO_RIGHT" onAction="#routeSummaryButton" text="Back to Route Summary" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="2" GridPane.valignment="TOP">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</Button>
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
|
|||||||
@@ -32,6 +32,11 @@ public class DatasetTest {
|
|||||||
fail("The sample file is missing");
|
fail("The sample file is missing");
|
||||||
}
|
}
|
||||||
assertTrue(dataset.getAirlines().size() == dataset.getAirlineDictionary().size());
|
assertTrue(dataset.getAirlines().size() == dataset.getAirlineDictionary().size());
|
||||||
|
try {
|
||||||
|
assertTrue(dataset.getAirlines().get(0).getID() == 1);
|
||||||
|
} catch (DataException e) {
|
||||||
|
fail("The first index of Airlines should have an id of 1 as there has been no tampering with the data yet");
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
dataset.importAirport("res/Reduced Samples/Airports.txt");
|
dataset.importAirport("res/Reduced Samples/Airports.txt");
|
||||||
@@ -41,6 +46,11 @@ public class DatasetTest {
|
|||||||
assertTrue(dataset.getAirports().size() == dataset.getAirportDictionary().size());
|
assertTrue(dataset.getAirports().size() == dataset.getAirportDictionary().size());
|
||||||
assertTrue(dataset.getCities().size() == dataset.getCityDictionary().size());
|
assertTrue(dataset.getCities().size() == dataset.getCityDictionary().size());
|
||||||
assertTrue(dataset.getCountries().size() == dataset.getCountryDictionary().size());
|
assertTrue(dataset.getCountries().size() == dataset.getCountryDictionary().size());
|
||||||
|
try {
|
||||||
|
assertTrue(dataset.getAirports().get(0).getID() == 1);
|
||||||
|
} catch (DataException e) {
|
||||||
|
fail("The first index of Airports should have an id of 1 as there has been no tampering with the data yet");
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
dataset.importRoute("res/Reduced Samples/Routes.txt");
|
dataset.importRoute("res/Reduced Samples/Routes.txt");
|
||||||
@@ -48,6 +58,11 @@ public class DatasetTest {
|
|||||||
fail("The sample file is missing");
|
fail("The sample file is missing");
|
||||||
}
|
}
|
||||||
assertTrue(dataset.getRoutes().size() == dataset.getRouteDictionary().size());
|
assertTrue(dataset.getRoutes().size() == dataset.getRouteDictionary().size());
|
||||||
|
try {
|
||||||
|
assertTrue(dataset.getRoutes().get(0).getID() == 1);
|
||||||
|
} catch (DataException e) {
|
||||||
|
fail("The first index of Routes should have an id of 1 as there has been no tampering with the data yet");
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
dataset.importFlight("res/Reduced Samples/NZCH-WSSS.csv");
|
dataset.importFlight("res/Reduced Samples/NZCH-WSSS.csv");
|
||||||
@@ -55,6 +70,11 @@ public class DatasetTest {
|
|||||||
fail("The sample file is missing");
|
fail("The sample file is missing");
|
||||||
}
|
}
|
||||||
assertTrue(dataset.getFlightPaths().size() == dataset.getFlightPathDictionary().size());
|
assertTrue(dataset.getFlightPaths().size() == dataset.getFlightPathDictionary().size());
|
||||||
|
try {
|
||||||
|
assertTrue(dataset.getFlightPaths().get(0).getID() == 1);
|
||||||
|
} catch (DataException e) {
|
||||||
|
fail("The first index of Flight Paths should have an id of 1 as there has been no tampering with the data yet");
|
||||||
|
}
|
||||||
|
|
||||||
dataset.createDataLinks();
|
dataset.createDataLinks();
|
||||||
|
|
||||||
@@ -185,6 +205,8 @@ public class DatasetTest {
|
|||||||
fail("The sample file is missing");
|
fail("The sample file is missing");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assertTrue(dataset.getFlightPaths().get(0).getFlightPoints().get(0).getID() == 1);
|
||||||
|
|
||||||
FlightPoint flightPoint = dataset.getFlightPaths().get(0).getFlightPoints().get(6);
|
FlightPoint flightPoint = dataset.getFlightPaths().get(0).getFlightPoints().get(6);
|
||||||
FlightPoint flightPoint1 = dataset.getFlightPaths().get(0).getFlightPoints().get(5);
|
FlightPoint flightPoint1 = dataset.getFlightPaths().get(0).getFlightPoints().get(5);
|
||||||
dataset.deleteFlightPoint(1, 5);
|
dataset.deleteFlightPoint(1, 5);
|
||||||
@@ -198,6 +220,15 @@ public class DatasetTest {
|
|||||||
assertEquals(dataset.getFlightPaths().get(0).getFlightPoints().get(5).getName(), flightPoint1.getName());
|
assertEquals(dataset.getFlightPaths().get(0).getFlightPoints().get(5).getName(), flightPoint1.getName());
|
||||||
assertEquals(dataset.getFlightPaths().get(0).getFlightPoints().get(6).getName(), flightPoint.getName());
|
assertEquals(dataset.getFlightPaths().get(0).getFlightPoints().get(6).getName(), flightPoint.getName());
|
||||||
|
|
||||||
|
//edit order
|
||||||
|
FlightPoint wasLast = dataset.getFlightPaths().get(0).getFlightPoints().get(dataset.getFlightPaths().get(0).getFlightPoints().size() - 1);
|
||||||
|
FlightPoint wasSecondToLast = dataset.getFlightPaths().get(0).getFlightPoints().get(dataset.getFlightPaths().get(0).getFlightPoints().size() - 2);
|
||||||
|
FlightPoint wasFirst = dataset.getFlightPaths().get(0).getFlightPoints().get(0);
|
||||||
|
dataset.moveFlightPoint(wasLast, 0);
|
||||||
|
assertTrue(dataset.getFlightPaths().get(0).getFlightPoints().indexOf(wasLast) == 0);
|
||||||
|
assertTrue(dataset.getFlightPaths().get(0).getFlightPoints().indexOf(wasSecondToLast) == dataset.getFlightPaths().get(0).getFlightPoints().size() - 1);
|
||||||
|
assertTrue(dataset.getFlightPaths().get(0).getFlightPoints().indexOf(wasFirst) == 1);
|
||||||
|
|
||||||
app.deleteDataset(app.getCurrentDataset());
|
app.deleteDataset(app.getCurrentDataset());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user