Merge branch 'remaking_rd_gui'
This commit is contained in:
@@ -155,6 +155,10 @@ public class AirlineFilter extends Filter{
|
||||
return filteredList;
|
||||
}
|
||||
|
||||
// public ArrayList getBaseList(){
|
||||
// return baseArray;
|
||||
// }
|
||||
|
||||
/**
|
||||
* sets a new base list of the filter.
|
||||
* @param arrayList
|
||||
|
||||
@@ -166,8 +166,16 @@ public class App extends Application
|
||||
return (Initializable) loader.getController();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current session.
|
||||
* @return
|
||||
*/
|
||||
public Session getSession() {
|
||||
return this.session;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Menu COntroller of the App.
|
||||
* Returns the Menu Controller of the App.
|
||||
* @return
|
||||
*/
|
||||
public MenuController getMenuController() {
|
||||
|
||||
@@ -9,7 +9,9 @@ public enum SceneCode {
|
||||
AIRPORT_SUMMARY("airport_summary.fxml"), AIRPORT_RAW_DATA("airport_raw_data.fxml"),
|
||||
ROUTE_SUMMARY("routes_summary.fxml"), ROUTE_RAW_DATA("route_raw_data.fxml"), FLIGHT_SUMMARY("flight_data_summary.fxml"),
|
||||
FLIGHT_RAW_DATA("flight_raw_data.fxml"), AIRPORT_ANALYSER("airport_analyser.fxml"), ROUTE_ANALYSER("route_analyser.fxml"),
|
||||
AIRPORT_DIST_CALC("airport_dist_calc.fxml");
|
||||
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");
|
||||
|
||||
private String filePath;
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package seng202.group9.Controller;
|
||||
|
||||
import javafx.collections.ObservableList;
|
||||
import seng202.group9.Core.Airline;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* Created by fwy13 on 16/09/16.
|
||||
@@ -8,6 +12,9 @@ import java.io.Serializable;
|
||||
*/
|
||||
public class Session implements Serializable {
|
||||
private SceneCode sceneDisplayed;
|
||||
private HashMap<Integer, String> filteredAirlines;
|
||||
private HashMap<Integer, String> filteredAirports;
|
||||
private HashMap<Integer, String> filteredRoutes;
|
||||
|
||||
/**
|
||||
* Constructor for a new session
|
||||
@@ -40,4 +47,28 @@ public class Session implements Serializable {
|
||||
public SceneCode getSceneDisplayed() {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.control.cell.PropertyValueFactory;
|
||||
import seng202.group9.Controller.AirlineFilter;
|
||||
import seng202.group9.Controller.Dataset;
|
||||
import seng202.group9.Controller.*;
|
||||
import seng202.group9.Core.Airline;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
/**
|
||||
* The GUI controller class for airline_raw_data.fxml.
|
||||
@@ -20,56 +23,26 @@ public class AirlineRDController extends Controller {
|
||||
@FXML
|
||||
private TableView<Airline> tableViewAirlineRD;
|
||||
@FXML
|
||||
private TableColumn<Airline, String> airlIDcol;
|
||||
private TableColumn<Airline, String> airlIDCol;
|
||||
@FXML
|
||||
private TableColumn<Airline, String> airlNamecol;
|
||||
private TableColumn<Airline, String> airlNameCol;
|
||||
@FXML
|
||||
private TableColumn<Airline, String> airlAliascol;
|
||||
private TableColumn<Airline, String> airlAliasCol;
|
||||
@FXML
|
||||
private TableColumn<Airline, String> airlIATAcol;
|
||||
private TableColumn<Airline, String> airlIATACol;
|
||||
@FXML
|
||||
private TableColumn<Airline, String> airlICAOcol;
|
||||
private TableColumn<Airline, String> airlICAOCol;
|
||||
@FXML
|
||||
private TableColumn<Airline, String> airlCallsigncol;
|
||||
private TableColumn<Airline, String> airlCallsignCol;
|
||||
@FXML
|
||||
private TableColumn<Airline, String> airlCountrycol;
|
||||
private TableColumn<Airline, String> airlCountryCol;
|
||||
@FXML
|
||||
private TableColumn<Airline, String> airlActivecol;
|
||||
private TableColumn<Airline, String> airlActiveCol;
|
||||
|
||||
//Setting up text fields for adding data
|
||||
@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.
|
||||
//Set an empty Dataset to be assigned to the current dataset.
|
||||
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.
|
||||
@@ -77,59 +50,48 @@ public class AirlineRDController extends Controller {
|
||||
*/
|
||||
public void load() {
|
||||
//Sets up the table columns to be ready for use for Airline data
|
||||
airlIDcol.setCellValueFactory(new PropertyValueFactory<Airline, String>("ID"));
|
||||
airlNamecol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Name"));
|
||||
airlAliascol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Alias"));
|
||||
airlIATAcol.setCellValueFactory(new PropertyValueFactory<Airline, String>("IATA"));
|
||||
airlICAOcol.setCellValueFactory(new PropertyValueFactory<Airline, String>("ICAO"));
|
||||
airlCallsigncol.setCellValueFactory(new PropertyValueFactory<Airline, String>("CallSign"));
|
||||
airlCountrycol.setCellValueFactory(new PropertyValueFactory<Airline, String>("CountryName"));
|
||||
airlActivecol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Active"));
|
||||
airlIDCol.setCellValueFactory(new PropertyValueFactory<Airline, String>("ID"));
|
||||
airlNameCol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Name"));
|
||||
airlAliasCol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Alias"));
|
||||
airlIATACol.setCellValueFactory(new PropertyValueFactory<Airline, String>("IATA"));
|
||||
airlICAOCol.setCellValueFactory(new PropertyValueFactory<Airline, String>("ICAO"));
|
||||
airlCallsignCol.setCellValueFactory(new PropertyValueFactory<Airline, String>("CallSign"));
|
||||
airlCountryCol.setCellValueFactory(new PropertyValueFactory<Airline, String>("CountryName"));
|
||||
airlActiveCol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Active"));
|
||||
|
||||
//Assigning the Dataset to the current Dataset's airlines and displaying it in a table
|
||||
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
|
||||
airlActiveCBox.setValue("Y");
|
||||
airlActiveCBox.getItems().addAll("Y", "N");
|
||||
tableViewAirlineRD.setItems(FXCollections.observableArrayList(theDataSet.getAirlines()));
|
||||
tableViewAirlineRD.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* Takes in values from the GUI the user has typed in.
|
||||
* @see Dataset
|
||||
* Opens the Airline Filter form.
|
||||
*/
|
||||
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(
|
||||
airlNameBox.getText(),
|
||||
airlAliasBox.getText(),
|
||||
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();
|
||||
public void openFilter() {
|
||||
createPopUpStage(SceneCode.AIRLINE_FILTER, 600, 370);
|
||||
ArrayList<Airline> d = new ArrayList();
|
||||
for(int i = 0; i < theDataSet.getAirlines().size(); i++) {
|
||||
if (currentSession.getFilteredAirlines().containsValue(theDataSet.getAirlines().get(i).getName())
|
||||
&& currentSession.getFilteredAirlines().containsKey(i)) {
|
||||
d.add(theDataSet.getAirlines().get(i));
|
||||
}
|
||||
}
|
||||
tableViewAirlineRD.setItems(FXCollections.observableArrayList(d));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deletes a single selected airline entry from the database.
|
||||
* Updates the GUI accordingly.
|
||||
@@ -137,44 +99,23 @@ public class AirlineRDController extends Controller {
|
||||
*/
|
||||
public void deleteAirline() {
|
||||
//Gets an airline from the table and deletes it before updating the table
|
||||
Airline toDelete = tableViewAirlineRD.getSelectionModel().getSelectedItem();
|
||||
theDataSet.deleteAirline(toDelete);
|
||||
tableViewAirlineRD.setItems(FXCollections.observableArrayList(theDataSet.getAirlines()));
|
||||
ObservableList<Airline> toDelete = tableViewAirlineRD.getSelectionModel().getSelectedItems();
|
||||
Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
|
||||
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.
|
||||
@@ -183,4 +124,8 @@ public class AirlineRDController extends Controller {
|
||||
public void analyse_Button() {
|
||||
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;
|
||||
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.control.cell.PropertyValueFactory;
|
||||
import seng202.group9.Controller.AirportFilter;
|
||||
import seng202.group9.Controller.Dataset;
|
||||
import seng202.group9.Controller.SceneCode;
|
||||
import seng202.group9.Controller.Session;
|
||||
import seng202.group9.Core.Airport;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Optional;
|
||||
|
||||
import static javafx.collections.FXCollections.observableArrayList;
|
||||
|
||||
/**
|
||||
@@ -21,80 +26,34 @@ public class AirportRDController extends Controller{
|
||||
@FXML
|
||||
private TableView<Airport> tableViewAirportRD;
|
||||
@FXML
|
||||
private TableColumn<Airport, String> airpIDcol;
|
||||
private TableColumn<Airport, String> airpIDCol;
|
||||
@FXML
|
||||
private TableColumn<Airport, String> airpNamecol;
|
||||
private TableColumn<Airport, String> airpNameCol;
|
||||
@FXML
|
||||
private TableColumn<Airport, String> airpCitycol;
|
||||
private TableColumn<Airport, String> airpCityCol;
|
||||
@FXML
|
||||
private TableColumn<Airport, String> airpCountrycol;
|
||||
private TableColumn<Airport, String> airpCountryCol;
|
||||
@FXML
|
||||
private TableColumn<Airport, String> airpIATAFFAcol;
|
||||
private TableColumn<Airport, String> airpIATAFFACol;
|
||||
@FXML
|
||||
private TableColumn<Airport, String> airpICAOcol;
|
||||
private TableColumn<Airport, String> airpICAOCol;
|
||||
@FXML
|
||||
private TableColumn<Airport, String> airpLatitudecol;
|
||||
private TableColumn<Airport, String> airpLatitudeCol;
|
||||
@FXML
|
||||
private TableColumn<Airport, String> airpLongitudecol;
|
||||
private TableColumn<Airport, String> airpLongitudeCol;
|
||||
@FXML
|
||||
private TableColumn<Airport, String> airpAltitudecol;
|
||||
private TableColumn<Airport, String> airpAltitudeCol;
|
||||
@FXML
|
||||
private TableColumn<Airport, String> airpTimezonecol;
|
||||
private TableColumn<Airport, String> airpTimezoneCol;
|
||||
@FXML
|
||||
private TableColumn<Airport, String> airpDSTcol;
|
||||
private TableColumn<Airport, String> airpDSTCol;
|
||||
@FXML
|
||||
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;
|
||||
private TableColumn<Airport, String> airpTzCol;
|
||||
|
||||
//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;
|
||||
|
||||
/**
|
||||
* Loads the initial airport data to the GUI table.
|
||||
@@ -102,68 +61,42 @@ public class AirportRDController extends Controller{
|
||||
*/
|
||||
public void load() {
|
||||
//Sets up the table columns to be ready for use for Airport data
|
||||
airpIDcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("ID"));
|
||||
airpNamecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Name"));
|
||||
airpCitycol.setCellValueFactory(new PropertyValueFactory<Airport, String>("CityName"));
|
||||
airpCountrycol.setCellValueFactory(new PropertyValueFactory<Airport, String>("CountryName"));
|
||||
airpIATAFFAcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("IATA_FFA"));
|
||||
airpICAOcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("ICAO"));
|
||||
airpLatitudecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Latitude"));
|
||||
airpLongitudecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Longitude"));
|
||||
airpAltitudecol.setCellValueFactory(new PropertyValueFactory<Airport, String> ("Altitude"));
|
||||
airpTimezonecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Timezone"));
|
||||
airpDSTcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("DST"));
|
||||
airpTzcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Tz"));
|
||||
airpIDCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("ID"));
|
||||
airpNameCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Name"));
|
||||
airpCityCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("CityName"));
|
||||
airpCountryCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("CountryName"));
|
||||
airpIATAFFACol.setCellValueFactory(new PropertyValueFactory<Airport, String>("IATA_FFA"));
|
||||
airpICAOCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("ICAO"));
|
||||
airpLatitudeCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Latitude"));
|
||||
airpLongitudeCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Longitude"));
|
||||
airpAltitudeCol.setCellValueFactory(new PropertyValueFactory<Airport, String> ("Altitude"));
|
||||
airpTimezoneCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Timezone"));
|
||||
airpDSTCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("DST"));
|
||||
airpTzCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Tz"));
|
||||
|
||||
//Assigning the Dataset to the current Dataset's airports and displaying it in a table
|
||||
theDataSet = getParent().getCurrentDataset();
|
||||
currentSession = getParent().getSession();
|
||||
|
||||
tableViewAirportRD.setItems(observableArrayList(theDataSet.getAirports()));
|
||||
|
||||
|
||||
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");
|
||||
tableViewAirportRD.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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(
|
||||
airpNameBox.getText(),
|
||||
airpCityBox.getText(),
|
||||
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();
|
||||
public void openAdd() {
|
||||
createPopUpStage(SceneCode.AIRPORT_ADD, 600, 480);
|
||||
tableViewAirportRD.setItems(FXCollections.observableArrayList(theDataSet.getAirports()));
|
||||
}
|
||||
|
||||
public void openFilter() {
|
||||
createPopUpStage(SceneCode.AIRPORT_FILTER, 600, 480);
|
||||
ArrayList<Airport> d = new ArrayList();
|
||||
for(int i = 0; i < theDataSet.getAirports().size(); i++) {
|
||||
if (currentSession.getFilteredAirports().containsValue(theDataSet.getAirports().get(i).getName())
|
||||
&& currentSession.getFilteredAirports().containsKey(i)) {
|
||||
d.add(theDataSet.getAirports().get(i));
|
||||
}
|
||||
}
|
||||
tableViewAirportRD.setItems(FXCollections.observableArrayList(d));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -173,60 +106,35 @@ public class AirportRDController extends Controller{
|
||||
*/
|
||||
public void deleteAirport(){
|
||||
//Gets an airport from the table and deletes it before updating the table
|
||||
Airport toDelete = tableViewAirportRD.getSelectionModel().getSelectedItem();
|
||||
theDataSet.deleteAirport(toDelete);
|
||||
tableViewAirportRD.setItems(observableArrayList(theDataSet.getAirports()));
|
||||
// Airport toDelete = tableViewAirportRD.getSelectionModel().getSelectedItem();
|
||||
// theDataSet.deleteAirport(toDelete);
|
||||
// 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.
|
||||
* @see AirportAnalyser
|
||||
*/
|
||||
public void analyse_Button(){ replaceSceneContent(SceneCode.AIRPORT_ANALYSER);}
|
||||
|
||||
public void airportSummaryButton() {
|
||||
replaceSceneContent(SceneCode.AIRPORT_SUMMARY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
package seng202.group9.GUI;
|
||||
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
import seng202.group9.Controller.App;
|
||||
import seng202.group9.Controller.SceneCode;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
@@ -50,6 +58,45 @@ public abstract class Controller implements Initializable{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a popup window with a specific fxml scene
|
||||
* @param scene
|
||||
* @param width
|
||||
* @param height
|
||||
*/
|
||||
public Stage createPopUpStage(SceneCode scene, int width, int height) {
|
||||
FXMLLoader loader = new FXMLLoader();
|
||||
InputStream in = getClass().getClassLoader().getResourceAsStream(scene.getFilePath());
|
||||
Parent page = null;
|
||||
try {
|
||||
page = loader.load(in);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
in.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
//set contorller and call default calls
|
||||
Controller controller = (Controller) loader.getController();
|
||||
controller.setApp(parent);
|
||||
controller.load();
|
||||
controller.loadOnce();
|
||||
//create a new stage to popup
|
||||
Stage popupStage = new Stage();
|
||||
popupStage.initModality(Modality.APPLICATION_MODAL);
|
||||
//inner layout constraints
|
||||
VBox container = new VBox();
|
||||
container.getChildren().add(page);
|
||||
Scene popupScene = new Scene(container, width, height);
|
||||
//show
|
||||
popupStage.setScene(popupScene);
|
||||
popupStage.showAndWait();
|
||||
return popupStage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Functions here will only load once and after the load function.
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.control.cell.PropertyValueFactory;
|
||||
import seng202.group9.Controller.Dataset;
|
||||
import seng202.group9.Controller.SceneCode;
|
||||
import seng202.group9.Controller.RouteFilter;
|
||||
import seng202.group9.Controller.Session;
|
||||
import seng202.group9.Core.Route;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* The GUI controller class for route_raw_data.fxml.
|
||||
* Extends from the abstract class {@link Controller}.
|
||||
@@ -37,36 +42,10 @@ public class RouteRDController extends Controller {
|
||||
@FXML
|
||||
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
|
||||
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.
|
||||
@@ -86,45 +65,27 @@ public class RouteRDController extends Controller {
|
||||
|
||||
//Assigning the Dataset to the current Dataset's routes and displaying it in a table
|
||||
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
|
||||
rCodeshareCBox.setValue("");
|
||||
rCodeshareCBox.getItems().addAll("Y", "");
|
||||
tableViewRouteRD.setItems(FXCollections.observableArrayList(theDataSet.getRoutes()));
|
||||
tableViewRouteRD.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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(
|
||||
rAirlineBox.getText(),
|
||||
rSourceBox.getText(),
|
||||
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();
|
||||
public void openAdd() {
|
||||
createPopUpStage(SceneCode.ROUTE_ADD, 600, 330);
|
||||
tableViewRouteRD.setItems(FXCollections.observableArrayList(theDataSet.getRoutes()));
|
||||
}
|
||||
|
||||
public void openFilter() {
|
||||
createPopUpStage(SceneCode.ROUTE_FILTER, 600, 330);
|
||||
ArrayList<Route> d = new ArrayList();
|
||||
for(int i = 0; i < theDataSet.getRoutes().size(); i++) {
|
||||
if (currentSession.getFilteredRoutes().containsValue(theDataSet.getRoutes().get(i).getAirlineName())
|
||||
&& currentSession.getFilteredRoutes().containsKey(i)) {
|
||||
d.add(theDataSet.getRoutes().get(i));
|
||||
}
|
||||
}
|
||||
tableViewRouteRD.setItems(FXCollections.observableArrayList(d));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -132,43 +93,25 @@ public class RouteRDController extends Controller {
|
||||
* Updates the GUI accordingly.
|
||||
* @see Dataset
|
||||
*/
|
||||
public void deleteRoute(){
|
||||
public void deleteRoute() {
|
||||
//Gets a route from the table and deletes it before updating the table
|
||||
Route toDelete = tableViewRouteRD.getSelectionModel().getSelectedItem();
|
||||
theDataSet.deleteRoute(toDelete);
|
||||
tableViewRouteRD.setItems(FXCollections.observableArrayList(theDataSet.getRoutes()));
|
||||
ObservableList<Route> toDelete = tableViewRouteRD.getSelectionModel().getSelectedItems();
|
||||
Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
|
||||
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.
|
||||
@@ -177,4 +120,9 @@ public class RouteRDController extends Controller {
|
||||
public void analyse_Button() {
|
||||
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.scene.control.Button?>
|
||||
<?import javafx.scene.control.ComboBox?>
|
||||
<?import javafx.scene.control.ContextMenu?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.MenuItem?>
|
||||
<?import javafx.scene.control.ScrollPane?>
|
||||
<?import javafx.scene.control.TableColumn?>
|
||||
<?import javafx.scene.control.TableView?>
|
||||
<?import javafx.scene.control.TextField?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.RowConstraints?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="568.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.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 hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="457.0" minHeight="10.0" prefHeight="403.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="129.0" minHeight="10.0" prefHeight="111.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="50.0" minHeight="0.0" prefHeight="50.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>
|
||||
<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>
|
||||
<Label layoutX="14.0" layoutY="14.0" text="Airline Raw Data">
|
||||
<font>
|
||||
<Font size="29.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Button layoutX="14.0" layoutY="526.0" mnemonicParsing="false" onAction="#analyse_Button" prefHeight="25.0" prefWidth="125.0" text="Analyse" />
|
||||
<Button layoutX="654.0" layoutY="526.0" mnemonicParsing="false" onAction="#addAirlineSingle" prefHeight="25.0" prefWidth="125.0" text="Add" />
|
||||
<Pane layoutX="14.0" layoutY="57.0" prefHeight="340.0" prefWidth="765.0">
|
||||
<children>
|
||||
<TableView fx:id="tableViewAirlineRD" layoutX="1.0" prefHeight="340.0" prefWidth="765.0">
|
||||
<columns>
|
||||
<TableColumn fx:id="airlIDcol" prefWidth="83.0" text="Airline ID" />
|
||||
<TableColumn fx:id="airlNamecol" prefWidth="450.0" text="Name" />
|
||||
<TableColumn fx:id="airlAliascol" minWidth="0.0" prefWidth="56.0" text="Alias" />
|
||||
<TableColumn fx:id="airlIATAcol" minWidth="0.0" prefWidth="59.0" text="IATA" />
|
||||
<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" />
|
||||
<Button mnemonicParsing="false" onAction="#analyse_Button" text="Analyse Airline Data">
|
||||
<HBox.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
<Button mnemonicParsing="false" onAction="#openFilter" text="Filter Airline Data">
|
||||
<HBox.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
<Button mnemonicParsing="false" nodeOrientation="LEFT_TO_RIGHT" onAction="#openAdd" text="Add New Airline">
|
||||
<HBox.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
</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>
|
||||
</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.scene.control.Button?>
|
||||
<?import javafx.scene.control.ComboBox?>
|
||||
<?import javafx.scene.control.ContextMenu?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.MenuItem?>
|
||||
<?import javafx.scene.control.ScrollPane?>
|
||||
<?import javafx.scene.control.TableColumn?>
|
||||
<?import javafx.scene.control.TableView?>
|
||||
<?import javafx.scene.control.TextField?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.RowConstraints?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="568.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.45" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.AirportRDController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="457.0" minHeight="10.0" prefHeight="403.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="129.0" minHeight="10.0" prefHeight="111.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<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 hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="50.0" minHeight="0.0" prefHeight="50.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>
|
||||
<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>
|
||||
<Label layoutX="14.0" layoutY="14.0" text="Airport Raw Data">
|
||||
<font>
|
||||
<Font size="29.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<ScrollPane hbarPolicy="ALWAYS" layoutX="14.0" layoutY="469.0" prefHeight="54.0" prefViewportHeight="29.0" prefViewportWidth="1095.0" prefWidth="764.0" vbarPolicy="NEVER">
|
||||
<content>
|
||||
<Pane prefHeight="39.0" prefWidth="1633.0">
|
||||
<children>
|
||||
<TextField fx:id="airpNameBox" layoutX="89.0" layoutY="4.0" prefHeight="31.0" prefWidth="350.0" promptText="Name">
|
||||
<padding>
|
||||
<Insets left="2.0" right="2.0" />
|
||||
</padding>
|
||||
</TextField>
|
||||
<TextField fx:id="airpCityBox" layoutX="439.0" layoutY="4.0" prefHeight="31.0" prefWidth="200.0" promptText="City">
|
||||
<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" />
|
||||
<Button mnemonicParsing="false" onAction="#analyse_Button" text="Analyse Airport Data">
|
||||
<HBox.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
<Button mnemonicParsing="false" onAction="#openFilter" text="Filter Airport Data">
|
||||
<HBox.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
<Button mnemonicParsing="false" nodeOrientation="LEFT_TO_RIGHT" onAction="#openAdd" text="Add New Airport">
|
||||
<HBox.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
</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>
|
||||
</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.scene.control.Button?>
|
||||
<?import javafx.scene.control.ComboBox?>
|
||||
<?import javafx.scene.control.ContextMenu?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.MenuItem?>
|
||||
<?import javafx.scene.control.Separator?>
|
||||
<?import javafx.scene.control.TableColumn?>
|
||||
<?import javafx.scene.control.TableView?>
|
||||
<?import javafx.scene.control.TextField?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.RowConstraints?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="568.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.45" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.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 hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="457.0" minHeight="10.0" prefHeight="403.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="457.0" minHeight="10.0" prefHeight="403.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="50.0" minHeight="0.0" prefHeight="50.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>
|
||||
<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>
|
||||
<Label layoutX="14.0" layoutY="14.0" text="Route Raw Data">
|
||||
<font>
|
||||
<Font size="29.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Button layoutX="14.0" layoutY="524.0" mnemonicParsing="false" onAction="#analyse_Button" prefHeight="25.0" prefWidth="125.0" text="Analyse" />
|
||||
<Button layoutX="656.0" layoutY="524.0" mnemonicParsing="false" onAction="#addRouteSingle" prefHeight="25.0" prefWidth="125.0" text="Add" />
|
||||
<Pane layoutX="16.0" layoutY="53.0" prefHeight="340.0" prefWidth="765.0">
|
||||
<children>
|
||||
<TableView fx:id="tableViewRouteRD" layoutX="-1.0" prefHeight="340.0" prefWidth="765.0">
|
||||
<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>
|
||||
<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" />
|
||||
<Button mnemonicParsing="false" onAction="#analyse_Button" text="Analyse Route Data">
|
||||
<HBox.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
<Button mnemonicParsing="false" onAction="#openFilter" text="Filter Route Data">
|
||||
<HBox.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
<Button mnemonicParsing="false" nodeOrientation="LEFT_TO_RIGHT" onAction="#openAdd" text="Add New Route">
|
||||
<HBox.margin>
|
||||
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
</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>
|
||||
</GridPane>
|
||||
|
||||
Reference in New Issue
Block a user