Merge branch 'master' of https://eng-git.canterbury.ac.nz/fwy13/SENG202
# Conflicts: # res/userdb.db
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,131 @@
|
|||||||
|
package seng202.group9.Controller;
|
||||||
|
|
||||||
|
import seng202.group9.Core.Airline;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by fwy13 on 16/09/16.
|
||||||
|
*/
|
||||||
|
public class AirlineFilter extends Filter{
|
||||||
|
|
||||||
|
private ArrayList<Airline> baseArray;
|
||||||
|
private ArrayList<Airline> filteredList;
|
||||||
|
|
||||||
|
public AirlineFilter(ArrayList<Airline> baseList){
|
||||||
|
filteredList = new ArrayList<Airline>();
|
||||||
|
baseArray = new ArrayList<Airline>();
|
||||||
|
for (Airline airline: baseList){
|
||||||
|
baseArray.add(airline);
|
||||||
|
filteredList.add(airline);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterName(String name){
|
||||||
|
String regexCode = "(?i).*"+name+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getName().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterAlias(String alias){
|
||||||
|
String regexCode = "(?i).*"+alias+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getAlias().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterIATA(String IATA){
|
||||||
|
String regexCode = "(?i).*"+IATA+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getIATA().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterICAO(String ICAO){
|
||||||
|
String regexCode = "(?i).*"+ICAO+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getICAO().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterCallsign(String callsign){
|
||||||
|
String regexCode = "(?i).*"+callsign+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getCallSign().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterCountry(String country){
|
||||||
|
String regexCode = "(?i).*"+country+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getCountryName().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterActive(String active){
|
||||||
|
String regexCode = "(?i).*"+active+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getActive().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reset() {
|
||||||
|
filteredList = new ArrayList<Airline>();
|
||||||
|
for (Airline airline: filteredList){
|
||||||
|
filteredList.add(airline);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList getFilteredData() {
|
||||||
|
return filteredList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBaseList(ArrayList<Airline> arrayList) {
|
||||||
|
baseArray = new ArrayList<Airline>();
|
||||||
|
for (Airline airline: arrayList){
|
||||||
|
baseArray.add(airline);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void printFilter(){
|
||||||
|
for (Airline airline: filteredList){
|
||||||
|
System.out.println(airline);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,180 @@
|
|||||||
|
package seng202.group9.Controller;
|
||||||
|
|
||||||
|
import seng202.group9.Core.Airline;
|
||||||
|
import seng202.group9.Core.Airport;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by fwy13 on 16/09/16.
|
||||||
|
*/
|
||||||
|
public class AirportFilter extends Filter{
|
||||||
|
|
||||||
|
private ArrayList<Airport> baseArray;
|
||||||
|
private ArrayList<Airport> filteredList;
|
||||||
|
|
||||||
|
public AirportFilter(ArrayList<Airport> baseList){
|
||||||
|
filteredList = new ArrayList<Airport>();
|
||||||
|
baseArray = new ArrayList<Airport>();
|
||||||
|
for (Airport airport: baseList){
|
||||||
|
baseArray.add(airport);
|
||||||
|
filteredList.add(airport);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterName(String name){
|
||||||
|
String regexCode = "(?i).*"+name+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getName().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterCity(String city){
|
||||||
|
String regexCode = "(?i).*"+city+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getCityName().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterCountry(String country){
|
||||||
|
String regexCode = "(?i).*"+country+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getCountryName().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterIATA_FFA(String IATA_FFA){
|
||||||
|
String regexCode = "(?i).*"+IATA_FFA+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getIATA_FFA().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterICAO(String ICAO){
|
||||||
|
String regexCode = "(?i).*"+ICAO+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getICAO().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterLatitude(String latitude){
|
||||||
|
String regexCode = "(?i).*"+latitude+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!String.valueOf(filteredList.get(index).getLatitude()).matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterLongitude(String longitude){
|
||||||
|
String regexCode = "(?i).*"+longitude+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!String.valueOf(filteredList.get(index).getLongitude()).matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterAltitude(String altitude){
|
||||||
|
String regexCode = "(?i).*"+altitude+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!String.valueOf(filteredList.get(index).getAltitude()).matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterTimezone(String timezone){
|
||||||
|
String regexCode = "(?i).*"+timezone+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!String.valueOf(filteredList.get(index).getCity(). getTimezone()).matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterOlson(String olson){
|
||||||
|
String regexCode = "(?i).*"+olson+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getCity().getTimeOlson().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterDST(String DST){
|
||||||
|
String regexCode = "(?i).*"+DST+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getCountry().getDST().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reset() {
|
||||||
|
filteredList = new ArrayList<Airport>();
|
||||||
|
for (Airport airport: filteredList){
|
||||||
|
filteredList.add(airport);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList getFilteredData() {
|
||||||
|
return filteredList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBaseList(ArrayList<Airport> arrayList) {
|
||||||
|
baseArray = new ArrayList<Airport>();
|
||||||
|
for (Airport airport: arrayList){
|
||||||
|
baseArray.add(airport);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void printFilter(){
|
||||||
|
for (Airport airport: filteredList){
|
||||||
|
System.out.println(airport);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -23,7 +23,7 @@ import seng202.group9.GUI.MenuController;
|
|||||||
*/
|
*/
|
||||||
public class App extends Application
|
public class App extends Application
|
||||||
{
|
{
|
||||||
private ArrayList<Dataset> Datasets = new ArrayList<Dataset>();
|
private ArrayList<Dataset> datasets = new ArrayList<Dataset>();
|
||||||
private Dataset currentDataset = null;
|
private Dataset currentDataset = null;
|
||||||
private Stage primaryStage = null;
|
private Stage primaryStage = null;
|
||||||
private VBox mainContainer;
|
private VBox mainContainer;
|
||||||
@@ -62,6 +62,10 @@ public class App extends Application
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
AirlineFilter filter = new AirlineFilter(currentDataset.getAirlines());
|
||||||
|
filter.filterName("NZ");
|
||||||
|
filter.filterAlias("flight");
|
||||||
|
filter.printFilter();
|
||||||
/*
|
/*
|
||||||
//testout single route adding
|
//testout single route adding
|
||||||
try {
|
try {
|
||||||
@@ -75,14 +79,12 @@ public class App extends Application
|
|||||||
}catch (DataException e){
|
}catch (DataException e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
//testout single airline adding
|
//testout single airline adding
|
||||||
try {
|
try {
|
||||||
currentDataset.addAirline("Dota2", "Valve", "D2", "DOT", "Defence of the Ancients", "Steam", "Y");
|
currentDataset.addAirline("Dota2", "Valve", "D2", "DOT", "Defence of the Ancients", "Steam", "Y");
|
||||||
}catch (DataException e){
|
}catch (DataException e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
//testing out airport parser
|
//testing out airport parser
|
||||||
try {
|
try {
|
||||||
System.out.println(currentDataset.importAirport("res/Samples/Airports.txt"));
|
System.out.println(currentDataset.importAirport("res/Samples/Airports.txt"));
|
||||||
@@ -136,4 +138,9 @@ public class App extends Application
|
|||||||
public Dataset getCurrentDataset(){
|
public Dataset getCurrentDataset(){
|
||||||
return currentDataset;
|
return currentDataset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void deleteDataset(Dataset dataset){
|
||||||
|
dataset.deleteDataset();
|
||||||
|
datasets.remove(dataset);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ public class Dataset {
|
|||||||
String airCallsign = rs.getString("CallSign");
|
String airCallsign = rs.getString("CallSign");
|
||||||
String airCountry = rs.getString("Country");
|
String airCountry = rs.getString("Country");
|
||||||
String airActive = rs.getString("Active");
|
String airActive = rs.getString("Active");
|
||||||
Airline airlineToAdd = new Airline(airID, airName, airIATA, airICAO, airAlias, airCallsign, airCountry, airActive);
|
Airline airlineToAdd = new Airline(airID, airName, airAlias, airIATA, airICAO, airCallsign, airCountry, airActive);
|
||||||
//assuming that all names will be unique
|
//assuming that all names will be unique
|
||||||
airlineDictionary.put(airName, airlineToAdd);
|
airlineDictionary.put(airName, airlineToAdd);
|
||||||
airlines.add(airlineToAdd);
|
airlines.add(airlineToAdd);
|
||||||
@@ -239,6 +239,7 @@ public class Dataset {
|
|||||||
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
|
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
|
createDataLinks();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -739,14 +740,18 @@ public class Dataset {
|
|||||||
|
|
||||||
public void createDataLinks(){
|
public void createDataLinks(){
|
||||||
//this may be seperated into more sepearate function in the future for time optimisation
|
//this may be seperated into more sepearate function in the future for time optimisation
|
||||||
|
HashMap<String, Airline> airlineByIATA= new HashMap<String, Airline>();
|
||||||
//create Airline country link
|
//create Airline country link
|
||||||
for (Airline airline: airlines){
|
for (Airline airline: airlines){
|
||||||
|
airlineByIATA.put(airline.getAlias(), airline);
|
||||||
|
//System.out.println(airline.getAlias());
|
||||||
airline.setCountry(countryDictionary.get(airline.getCountryName()));
|
airline.setCountry(countryDictionary.get(airline.getCountryName()));
|
||||||
}
|
}
|
||||||
//create Airport City and Country Link
|
//create Airport City and Country Link
|
||||||
HashMap<String, Airport> airportsByIATA = new HashMap<String, Airport>(); //this is used later for connecting the routes
|
HashMap<String, Airport> airportsByIATA = new HashMap<String, Airport>(); //this is used later for connecting the routes
|
||||||
HashMap<String, Airport> airportsByICAO = new HashMap<String, Airport>(); //this is used later for connecting the routes
|
HashMap<String, Airport> airportsByICAO = new HashMap<String, Airport>(); //this is used later for connecting the routes
|
||||||
for (Airport airport: airports){
|
for (Airport airport: airports){
|
||||||
|
//System.out.println(airport.getIATA_FFA());
|
||||||
airportsByIATA.put(airport.getIATA_FFA(), airport);
|
airportsByIATA.put(airport.getIATA_FFA(), airport);
|
||||||
airportsByICAO.put(airport.getICAO(), airport);
|
airportsByICAO.put(airport.getICAO(), airport);
|
||||||
airport.setCountry(countryDictionary.get(airport.getCountryName()));
|
airport.setCountry(countryDictionary.get(airport.getCountryName()));
|
||||||
@@ -766,7 +771,7 @@ public class Dataset {
|
|||||||
}else{
|
}else{
|
||||||
route.setDestinationAirport(airportsByIATA.get(route.getArrivalAirport()));
|
route.setDestinationAirport(airportsByIATA.get(route.getArrivalAirport()));
|
||||||
}
|
}
|
||||||
route.setAirline(airlineDictionary.get(route.getAirlineName()));
|
route.setAirline(airlineByIATA.get(route.getAirlineName()));
|
||||||
}
|
}
|
||||||
System.out.println("Links Made");
|
System.out.println("Links Made");
|
||||||
}
|
}
|
||||||
@@ -1081,9 +1086,6 @@ public class Dataset {
|
|||||||
stmt.close();
|
stmt.close();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch ( Exception e ) {
|
} catch ( Exception e ) {
|
||||||
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
|
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
@@ -1095,6 +1097,242 @@ public class Dataset {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* This is called in conjunction to the App deleteDataset DO NOT CALL UNLESS THROUGH APP.DELETEDATASET
|
||||||
|
*/
|
||||||
|
public void deleteDataset(){
|
||||||
|
//drop the tables
|
||||||
|
Connection c = null;
|
||||||
|
Statement stmt = null;
|
||||||
|
try {
|
||||||
|
Class.forName("org.sqlite.JDBC");
|
||||||
|
c = DriverManager.getConnection("jdbc:sqlite:res/userdb.db");
|
||||||
|
String[] tablesToDrop = {"_Airline", "_Airport", "_City", "_Country", "_Routes", "_Flight_Path", "_Flight_Points"};
|
||||||
|
for (int i = 0; i < tablesToDrop.length; i++){
|
||||||
|
stmt = c.createStatement();
|
||||||
|
String dropTableStatment = "DROP TABLE `"+this.name+tablesToDrop[i]+"`";
|
||||||
|
stmt.execute(dropTableStatment);
|
||||||
|
stmt.close();
|
||||||
|
}
|
||||||
|
stmt = c.createStatement();
|
||||||
|
String deleteDatasetEntry = "DELETE FROM `Datasets` WHERE `Dataset_Name` = \""+this.name+"\"";
|
||||||
|
stmt.execute(deleteDatasetEntry);
|
||||||
|
stmt.close();
|
||||||
|
c.close();
|
||||||
|
} catch ( Exception e ) {
|
||||||
|
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* deletes an airline from the dataset.
|
||||||
|
* @param airline
|
||||||
|
*/
|
||||||
|
public void deleteAirline(Airline airline){
|
||||||
|
//drop the entries
|
||||||
|
Connection c = null;
|
||||||
|
Statement stmt = null;
|
||||||
|
try {
|
||||||
|
Class.forName("org.sqlite.JDBC");
|
||||||
|
c = DriverManager.getConnection("jdbc:sqlite:res/userdb.db");
|
||||||
|
String deleteQuery = "DELETE FROM `"+this.name+"_Airline` WHERE `Airline_ID` = " + airline.getID() + ";";
|
||||||
|
stmt = c.createStatement();
|
||||||
|
stmt.execute(deleteQuery);
|
||||||
|
stmt.close();
|
||||||
|
stmt = c.createStatement();
|
||||||
|
//check if number of countries that contain airlines > 0 else delete the country
|
||||||
|
String countCountry = "SELECT COUNT(*) FROM `"+this.name+"_Airline` JOIN `"+this.name+"_Country` ON" +
|
||||||
|
" `"+this.name+"_Country`.`Country_Name` = `"+this.name+"_Airline`.`Country`" +
|
||||||
|
" WHERE `"+this.name+"_Airline`.`Country` = \""+airline.getCountry().getName().replace("\"", "\"\"")+"\"";
|
||||||
|
ResultSet countCountryRes = stmt.executeQuery(countCountry);
|
||||||
|
int countryCount = 0;
|
||||||
|
while (countCountryRes.next()){
|
||||||
|
countryCount += countCountryRes.getInt("COUNT(*)");
|
||||||
|
}
|
||||||
|
countCountryRes.close();
|
||||||
|
stmt.close();
|
||||||
|
//check if number of counties that contain airports > 0 else delete the country
|
||||||
|
String countCountryA = "SELECT COUNT(*) FROM `"+this.name+"_Airport` JOIN `"+this.name+"_Country` ON" +
|
||||||
|
" `"+this.name+"_Country`.`Country_Name` = `"+this.name+"_Airport`.`Country`" +
|
||||||
|
" WHERE `"+this.name+"_Airport`.`Country` = \""+airline.getCountry().getName().replace("\"", "\"\"")+"\"";
|
||||||
|
countCountryRes = stmt.executeQuery(countCountryA);
|
||||||
|
while (countCountryRes.next()){
|
||||||
|
countryCount += countCountryRes.getInt("COUNT(*)");
|
||||||
|
}
|
||||||
|
countCountryRes.close();
|
||||||
|
stmt.close();
|
||||||
|
//delete country if there are no matches
|
||||||
|
if (countryCount == 0){
|
||||||
|
stmt = c.createStatement();
|
||||||
|
String deleteCountry = "DELETE FROM `"+this.name+"_Country` WHERE `Country_Name` = \""+airline.getCountry().getName()+"\"";
|
||||||
|
stmt.execute(deleteCountry);
|
||||||
|
stmt.close();
|
||||||
|
}
|
||||||
|
c.close();
|
||||||
|
} catch ( Exception e ) {
|
||||||
|
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
airlines.remove(airline);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteAirline(int index){
|
||||||
|
deleteAirline(airlines.get(index));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* deletes an airport from the dataset.
|
||||||
|
* @param airport
|
||||||
|
*/
|
||||||
|
public void deleteAirport(Airport airport){
|
||||||
|
//drop the entries
|
||||||
|
Connection c = null;
|
||||||
|
Statement stmt = null;
|
||||||
|
try {
|
||||||
|
Class.forName("org.sqlite.JDBC");
|
||||||
|
c = DriverManager.getConnection("jdbc:sqlite:res/userdb.db");
|
||||||
|
String deleteQuery = "DELETE FROM `"+this.name+"_Airport` WHERE `Airport_ID` = " + airport.getID() + ";";
|
||||||
|
stmt = c.createStatement();
|
||||||
|
stmt.execute(deleteQuery);
|
||||||
|
stmt.close();
|
||||||
|
//check if number of countries that contain airports and airlines > 0 else delete the country
|
||||||
|
String countCountry = "SELECT COUNT(*) FROM `"+this.name+"_Airport` JOIN `"+this.name+"_Country` ON" +
|
||||||
|
" `"+this.name+"_Country`.`Country_Name` = `"+this.name+"_Airport`.`Country`" +
|
||||||
|
" WHERE `"+this.name+"_Airport`.`Country` = \""+airport.getCountry().getName().replace("\"", "\"\"")+"\"";
|
||||||
|
ResultSet countCountryRes = stmt.executeQuery(countCountry);
|
||||||
|
int countryCount = 0;
|
||||||
|
while (countCountryRes.next()){
|
||||||
|
countryCount = countCountryRes.getInt("COUNT(*)");
|
||||||
|
}
|
||||||
|
countCountryRes.close();
|
||||||
|
stmt.close();
|
||||||
|
//check if number of countries that contain airlines > 0 else delete the country
|
||||||
|
String countCountryA = "SELECT COUNT(*) FROM `"+this.name+"_Airline` JOIN `"+this.name+"_Country` ON" +
|
||||||
|
" `"+this.name+"_Country`.`Country_Name` = `"+this.name+"_Airline`.`Country`" +
|
||||||
|
" WHERE `"+this.name+"_Airline`.`Country` = \""+airport.getCountry().getName().replace("\"", "\"\"")+"\"";
|
||||||
|
ResultSet countCountryResA = stmt.executeQuery(countCountry);
|
||||||
|
while (countCountryResA.next()){
|
||||||
|
countryCount += countCountryResA.getInt("COUNT(*)");
|
||||||
|
}
|
||||||
|
countCountryResA.close();
|
||||||
|
stmt.close();
|
||||||
|
//delete country if no matches
|
||||||
|
if (countryCount == 0){
|
||||||
|
stmt = c.createStatement();
|
||||||
|
String deleteCountry = "DELETE FROM `"+this.name+"_Country` WHERE `Country_Name` = \""+airport.getCountry().getName()+"\"";
|
||||||
|
stmt.execute(deleteCountry);
|
||||||
|
stmt.close();
|
||||||
|
}
|
||||||
|
//cehck if number cities that contain airports > 0 else delete the city
|
||||||
|
String countCity = "SELECT COUNT(*) FROM `"+this.name+"_Airport` JOIN `"+this.name+"_City` ON" +
|
||||||
|
" `"+this.name+"_City`.`City_Name` = `"+this.name+"_Airport`.`City`" +
|
||||||
|
" WHERE `"+this.name+"_Airport`.`City` = \""+airport.getCityName().replace("\"", "\"\"")+"\"";
|
||||||
|
ResultSet countCityRes = stmt.executeQuery(countCity);
|
||||||
|
int cityCount = 0;
|
||||||
|
while (countCityRes.next()){
|
||||||
|
cityCount = countCityRes.getInt("COUNT(*)");
|
||||||
|
}
|
||||||
|
countCountryRes.close();
|
||||||
|
stmt.close();
|
||||||
|
//delete country if no matches
|
||||||
|
if (cityCount == 0){
|
||||||
|
stmt = c.createStatement();
|
||||||
|
String deleteCity = "DELETE FROM `"+this.name+"_City` WHERE `City_Name` = \""+airport.getCityName()+"\"";
|
||||||
|
stmt.execute(deleteCity);
|
||||||
|
stmt.close();
|
||||||
|
}
|
||||||
|
c.close();
|
||||||
|
} catch ( Exception e ) {
|
||||||
|
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
airports.remove(airport);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteAirport(int index){
|
||||||
|
deleteAirport(airports.get(index));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* deletes an route from the dataset.
|
||||||
|
* @param route
|
||||||
|
*/
|
||||||
|
public void deleteRoute(Route route){
|
||||||
|
//drop the entries
|
||||||
|
Connection c = null;
|
||||||
|
Statement stmt = null;
|
||||||
|
try {
|
||||||
|
Class.forName("org.sqlite.JDBC");
|
||||||
|
c = DriverManager.getConnection("jdbc:sqlite:res/userdb.db");
|
||||||
|
String deleteQuery = "DELETE FROM `"+this.name+"_Routes` WHERE `Route_ID` = " + route.getID() + ";";
|
||||||
|
stmt = c.createStatement();
|
||||||
|
stmt.execute(deleteQuery);
|
||||||
|
c.close();
|
||||||
|
} catch ( Exception e ) {
|
||||||
|
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
routes.remove(route);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteRoute(int index){
|
||||||
|
deleteRoute(routes.get(index));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* deletes an airline from the dataset.
|
||||||
|
* @param flightPath
|
||||||
|
*/
|
||||||
|
public void deleteFlightPath(FlightPath flightPath){
|
||||||
|
//delete all flight points with the id
|
||||||
|
while(flightPath.getFlightPoints().size() > 0){
|
||||||
|
deleteFlightPoint(flightPath.getFlightPoints().get(0), flightPath);
|
||||||
|
}
|
||||||
|
//drop the entries
|
||||||
|
Connection c = null;
|
||||||
|
Statement stmt = null;
|
||||||
|
try {
|
||||||
|
Class.forName("org.sqlite.JDBC");
|
||||||
|
c = DriverManager.getConnection("jdbc:sqlite:res/userdb.db");
|
||||||
|
String deleteQuery = "DELETE FROM `"+this.name+"_Flight_Path` WHERE `Path_ID` = " + flightPath.getID() + ";";
|
||||||
|
stmt = c.createStatement();
|
||||||
|
stmt.execute(deleteQuery);
|
||||||
|
c.close();
|
||||||
|
} catch ( Exception e ) {
|
||||||
|
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
flightPaths.remove(flightPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteFlightPath(int index){
|
||||||
|
deleteFlightPath(flightPaths.get(index));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* deletes an airline from the dataset.
|
||||||
|
* @param flightPoint
|
||||||
|
*/
|
||||||
|
public void deleteFlightPoint(FlightPoint flightPoint, FlightPath flightPath){
|
||||||
|
//drop the tables
|
||||||
|
Connection c = null;
|
||||||
|
Statement stmt = null;
|
||||||
|
try {
|
||||||
|
Class.forName("org.sqlite.JDBC");
|
||||||
|
c = DriverManager.getConnection("jdbc:sqlite:res/userdb.db");
|
||||||
|
String deleteQuery = "DELETE FROM `"+this.name+"_Flight_Points` WHERE `Point_ID` = " + flightPoint.getID() + ";";
|
||||||
|
stmt = c.createStatement();
|
||||||
|
stmt.execute(deleteQuery);
|
||||||
|
c.close();
|
||||||
|
} catch ( Exception e ) {
|
||||||
|
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
flightPath.getFlightPoints().remove(flightPoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteFlightPoint(int pathIndex, int pointIndex){
|
||||||
|
deleteFlightPoint(flightPaths.get(pathIndex).getFlightPoints().get(pointIndex), flightPaths.get(pathIndex));
|
||||||
|
}
|
||||||
|
|
||||||
public ArrayList<Airline> getAirlines() {
|
public ArrayList<Airline> getAirlines() {
|
||||||
return airlines;
|
return airlines;
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package seng202.group9.Controller;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by fwy13 on 16/09/16.
|
||||||
|
*/
|
||||||
|
public abstract class Filter {
|
||||||
|
abstract void reset();
|
||||||
|
abstract ArrayList getFilteredData();
|
||||||
|
}
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
package seng202.group9.Controller;
|
||||||
|
|
||||||
|
import seng202.group9.Core.Route;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by fwy13 on 16/09/16.
|
||||||
|
*/
|
||||||
|
public class RouteFilter extends Filter{
|
||||||
|
|
||||||
|
private ArrayList<Route> baseArray;
|
||||||
|
private ArrayList<Route> filteredList;
|
||||||
|
|
||||||
|
public RouteFilter(ArrayList<Route> baseList){
|
||||||
|
filteredList = new ArrayList<Route>();
|
||||||
|
baseArray = new ArrayList<Route>();
|
||||||
|
for (Route route: baseList){
|
||||||
|
baseArray.add(route);
|
||||||
|
filteredList.add(route);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterAirline(String airline){
|
||||||
|
String regexCode = "(?i).*"+airline+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getAirlineName().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterSourceAirport(String airport){
|
||||||
|
String regexCode = "(?i).*"+airport+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getDepartureAirport().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterDestinationAirport(String airport){
|
||||||
|
String regexCode = "(?i).*"+airport+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getArrivalAirport().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterCodeshare(String code){
|
||||||
|
String regexCode = "(?i).*"+code+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getCode().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterDestinationStops(String stops){
|
||||||
|
String regexCode = "(?i).*"+stops+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getArrivalAirport().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void filterEquipment(String equipment){
|
||||||
|
String regexCode = "(?i).*"+equipment+".*";
|
||||||
|
int index = 0;
|
||||||
|
while(index < filteredList.size()){
|
||||||
|
if (!filteredList.get(index).getEquipment().matches(regexCode)){
|
||||||
|
filteredList.remove(index);
|
||||||
|
}else{
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reset() {
|
||||||
|
filteredList = new ArrayList<Route>();
|
||||||
|
for (Route airline: filteredList){
|
||||||
|
filteredList.add(airline);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList getFilteredData() {
|
||||||
|
return filteredList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBaseList(ArrayList<Route> arrayList) {
|
||||||
|
baseArray = new ArrayList<Route>();
|
||||||
|
for (Route route: arrayList){
|
||||||
|
baseArray.add(route);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void printFilter(){
|
||||||
|
for (Route route: filteredList){
|
||||||
|
System.out.println(route);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,7 +9,7 @@ import java.util.ArrayList;
|
|||||||
* @author Fan-Wu Yang
|
* @author Fan-Wu Yang
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class Airline {
|
public class Airline{
|
||||||
private int ID;
|
private int ID;
|
||||||
private String IATA;
|
private String IATA;
|
||||||
private String ICAO;
|
private String ICAO;
|
||||||
|
|||||||
@@ -254,6 +254,31 @@ public class Airport {
|
|||||||
return country;
|
return country;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//JavaDoc needed
|
||||||
|
public Double getTimezone() {
|
||||||
|
if (this.city != null) {
|
||||||
|
return this.city.getTimezone();
|
||||||
|
}else{
|
||||||
|
return 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//JavaDoc needed
|
||||||
|
public String getDST() {
|
||||||
|
if (this.country != null) {
|
||||||
|
return this.country.getDST();
|
||||||
|
}else{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//JavaDoc needed
|
||||||
|
public String getTz() {
|
||||||
|
if (this.city != null) {
|
||||||
|
return this.city.getTimeOlson();
|
||||||
|
}else{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set country class associated with this airport
|
* set country class associated with this airport
|
||||||
* @param country
|
* @param country
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ public class FlightPoint {
|
|||||||
public FlightPoint(String type, String name, double altitude, double latitude, double longitude){
|
public FlightPoint(String type, String name, double altitude, double latitude, double longitude){
|
||||||
//extra calculations will have to be used to find heading, legdistance and total distance. If necessary
|
//extra calculations will have to be used to find heading, legdistance and total distance. If necessary
|
||||||
//Type 1 file the file the lecturers gave us
|
//Type 1 file the file the lecturers gave us
|
||||||
|
//indexID = flight path ID
|
||||||
|
//ID = unique Auto Increment value
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.ID = -1;
|
this.ID = -1;
|
||||||
this.indexID = -1;
|
this.indexID = -1;
|
||||||
|
|||||||
@@ -120,6 +120,31 @@ public class Route {
|
|||||||
return ID;
|
return ID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//JavaDoc needed
|
||||||
|
public int getAirlineID() throws DataException {
|
||||||
|
if (this.airline != null) {
|
||||||
|
return this.getAirline().getID();
|
||||||
|
}else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSourceID() throws DataException {
|
||||||
|
if (this.getSourceAirport() != null) {
|
||||||
|
return this.getSourceAirport().getID();
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDestID() throws DataException {
|
||||||
|
if (this.getDestinationAirport() != null) {
|
||||||
|
return this.getDestinationAirport().getID();
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the number of stops the route stops.
|
* returns the number of stops the route stops.
|
||||||
* @return
|
* @return
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
package seng202.group9.GUI;
|
package seng202.group9.GUI;
|
||||||
|
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
|
import javafx.collections.ObservableList;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.scene.control.Alert;
|
import javafx.scene.control.*;
|
||||||
import javafx.scene.control.TableColumn;
|
|
||||||
import javafx.scene.control.TableView;
|
|
||||||
import javafx.scene.control.TextField;
|
|
||||||
import javafx.scene.control.cell.PropertyValueFactory;
|
import javafx.scene.control.cell.PropertyValueFactory;
|
||||||
import seng202.group9.Controller.App;
|
import seng202.group9.Controller.App;
|
||||||
import seng202.group9.Controller.Dataset;
|
import seng202.group9.Controller.Dataset;
|
||||||
@@ -47,7 +45,8 @@ public class AirlineRDController extends MenuController {
|
|||||||
@FXML
|
@FXML
|
||||||
private TextField airlCountryBox;
|
private TextField airlCountryBox;
|
||||||
@FXML
|
@FXML
|
||||||
private TextField airlActiveBox;
|
//private TextField airlActiveBox;
|
||||||
|
private ComboBox<String> airlActiveCBox;
|
||||||
|
|
||||||
|
|
||||||
App parent;
|
App parent;
|
||||||
@@ -66,11 +65,13 @@ public class AirlineRDController extends MenuController {
|
|||||||
airlIATAcol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Alias"));
|
airlIATAcol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Alias"));
|
||||||
airlICAOcol.setCellValueFactory(new PropertyValueFactory<Airline, String>("IATA"));
|
airlICAOcol.setCellValueFactory(new PropertyValueFactory<Airline, String>("IATA"));
|
||||||
airlCallsigncol.setCellValueFactory(new PropertyValueFactory<Airline, String>("CallSign"));
|
airlCallsigncol.setCellValueFactory(new PropertyValueFactory<Airline, String>("CallSign"));
|
||||||
airlCountrycol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Country"));
|
airlCountrycol.setCellValueFactory(new PropertyValueFactory<Airline, String>("CountryName"));
|
||||||
airlActivecol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Active"));
|
airlActivecol.setCellValueFactory(new PropertyValueFactory<Airline, String>("Active"));
|
||||||
|
|
||||||
theDataSet = this.parent.getCurrentDataset();
|
theDataSet = this.parent.getCurrentDataset();
|
||||||
tableView.setItems(FXCollections.observableArrayList(theDataSet.getAirlines()));
|
tableView.setItems(FXCollections.observableArrayList(theDataSet.getAirlines()));
|
||||||
|
//ObservableList<String> activeOptions= FXCollections.observableArrayList("Y", "N");
|
||||||
|
airlActiveCBox.getItems().addAll("Y", "N");
|
||||||
}
|
}
|
||||||
|
|
||||||
//Dummy function to test the add button.
|
//Dummy function to test the add button.
|
||||||
@@ -84,14 +85,14 @@ public class AirlineRDController extends MenuController {
|
|||||||
airlICAOBox.getText(),
|
airlICAOBox.getText(),
|
||||||
airlCallsignBox.getText(),
|
airlCallsignBox.getText(),
|
||||||
airlCountryBox.getText(),
|
airlCountryBox.getText(),
|
||||||
airlActiveBox.getText());
|
airlActiveCBox.getSelectionModel().getSelectedItem().toString());
|
||||||
airlNameBox.clear();
|
airlNameBox.clear();
|
||||||
airlAliasBox.clear();
|
airlAliasBox.clear();
|
||||||
airlIATABox.clear();
|
airlIATABox.clear();
|
||||||
airlICAOBox.clear();
|
airlICAOBox.clear();
|
||||||
airlCallsignBox.clear();
|
airlCallsignBox.clear();
|
||||||
airlCountryBox.clear();
|
airlCountryBox.clear();
|
||||||
airlActiveBox.clear();
|
airlActiveCBox.getSelectionModel().clearSelection();
|
||||||
tableView.setItems(FXCollections.observableArrayList(theDataSet.getAirlines()));
|
tableView.setItems(FXCollections.observableArrayList(theDataSet.getAirlines()));
|
||||||
} catch ( Exception e ) {
|
} catch ( Exception e ) {
|
||||||
Alert alert = new Alert(Alert.AlertType.ERROR);
|
Alert alert = new Alert(Alert.AlertType.ERROR);
|
||||||
|
|||||||
@@ -43,5 +43,48 @@ public class AirlineSummaryController extends MenuController{
|
|||||||
currentData = this.parent.getCurrentDataset();
|
currentData = this.parent.getCurrentDataset();
|
||||||
tableView.setItems(FXCollections.observableArrayList(currentData.getAirlines()));
|
tableView.setItems(FXCollections.observableArrayList(currentData.getAirlines()));
|
||||||
}
|
}
|
||||||
|
public void airlineRawDataButton() {
|
||||||
|
try {
|
||||||
|
AirlineRDController rawDataController = (AirlineRDController)
|
||||||
|
parent.replaceSceneContent("airline_raw_data.fxml");
|
||||||
|
rawDataController.setApp(parent);
|
||||||
|
rawDataController.loadTables();
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void flightSummaryButton() {
|
||||||
|
try {
|
||||||
|
FlightSummaryController summaryController = (FlightSummaryController)
|
||||||
|
parent.replaceSceneContent("flight_data_summary.fxml");
|
||||||
|
summaryController.setApp(parent);
|
||||||
|
summaryController.flightPathListView();
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void airportSummaryButton() {
|
||||||
|
try {
|
||||||
|
AirportSummaryController summaryController = (AirportSummaryController)
|
||||||
|
parent.replaceSceneContent("airport_summary.fxml");
|
||||||
|
summaryController.setApp(parent);
|
||||||
|
summaryController.loadTables();
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void routeSummaryButton() {
|
||||||
|
try {
|
||||||
|
RouteSummaryController summaryController = (RouteSummaryController)
|
||||||
|
parent.replaceSceneContent("routes_summary.fxml");
|
||||||
|
summaryController.setApp(parent);
|
||||||
|
summaryController.loadTables();
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
package seng202.group9.GUI;
|
package seng202.group9.GUI;
|
||||||
|
|
||||||
|
import com.sun.javafx.collections.ObservableListWrapper;
|
||||||
import javafx.beans.InvalidationListener;
|
import javafx.beans.InvalidationListener;
|
||||||
|
import javafx.beans.property.SimpleStringProperty;
|
||||||
|
import javafx.beans.value.ObservableStringValue;
|
||||||
|
import javafx.beans.value.ObservableValue;
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
import javafx.collections.ListChangeListener;
|
import javafx.collections.ListChangeListener;
|
||||||
import javafx.collections.ObservableList;
|
import javafx.collections.ObservableList;
|
||||||
@@ -41,11 +45,11 @@ public class AirportRDController extends MenuController{
|
|||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airport, String> airpAltitudecol;
|
private TableColumn<Airport, String> airpAltitudecol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airport, City> airpTimezonecol;
|
private TableColumn<Airport, String> airpTimezonecol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airport, Country> airpDSTcol;
|
private TableColumn<Airport, String> airpDSTcol;
|
||||||
@FXML
|
@FXML
|
||||||
private TableColumn<Airport, City> airpTzcol;
|
private TableColumn<Airport, String> airpTzcol;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField airpNameBox;
|
private TextField airpNameBox;
|
||||||
@@ -66,7 +70,7 @@ public class AirportRDController extends MenuController{
|
|||||||
@FXML
|
@FXML
|
||||||
private TextField airpTimezoneBox;
|
private TextField airpTimezoneBox;
|
||||||
@FXML
|
@FXML
|
||||||
private TextField airpDSTBox;
|
private ComboBox<String> airpDSTCBox;
|
||||||
@FXML
|
@FXML
|
||||||
private TextField airpTzBox;
|
private TextField airpTzBox;
|
||||||
|
|
||||||
@@ -82,18 +86,18 @@ public class AirportRDController extends MenuController{
|
|||||||
public void loadTables() {
|
public void loadTables() {
|
||||||
airpIDcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("ID"));
|
airpIDcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("ID"));
|
||||||
airpNamecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Name"));
|
airpNamecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Name"));
|
||||||
airpCitycol.setCellValueFactory(new PropertyValueFactory<Airport, String>("City"));
|
airpCitycol.setCellValueFactory(new PropertyValueFactory<Airport, String>("CityName"));
|
||||||
airpCountrycol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Country"));
|
airpCountrycol.setCellValueFactory(new PropertyValueFactory<Airport, String>("CountryName"));
|
||||||
airpIATAFFAcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("IATA_FFA"));
|
airpIATAFFAcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("IATA_FFA"));
|
||||||
airpICAOcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("ICAO"));
|
airpICAOcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("ICAO"));
|
||||||
airpLatitudecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Latitude"));
|
airpLatitudecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Latitude"));
|
||||||
airpLongitudecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Longitude"));
|
airpLongitudecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Longitude"));
|
||||||
airpAltitudecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Altitude"));
|
airpAltitudecol.setCellValueFactory(new PropertyValueFactory<Airport, String> ("Altitude"));
|
||||||
airpTimezonecol.setCellValueFactory(new PropertyValueFactory<Airport, City>("Timezone"));
|
airpTimezonecol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Timezone"));
|
||||||
airpDSTcol.setCellValueFactory(new PropertyValueFactory<Airport, Country>("DST"));
|
airpDSTcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("DST"));
|
||||||
airpTzcol.setCellValueFactory(new PropertyValueFactory<Airport, City>("Tz"));
|
airpTzcol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Tz"));
|
||||||
|
|
||||||
// airpTimezonecol.setCellFactory(new Callback<TableColumn<Airport, String>, TableCell<Airport, City>>() {
|
// airpTimezonecol.setCellFactory(new Callback<TableColumn<Airport, String>, TableCell<Airport, String>>() {
|
||||||
//
|
//
|
||||||
// @Override
|
// @Override
|
||||||
// public TableCell<Airport, City> call(TableColumn<Airport, City> param) {
|
// public TableCell<Airport, City> call(TableColumn<Airport, City> param) {
|
||||||
@@ -112,6 +116,8 @@ public class AirportRDController extends MenuController{
|
|||||||
// });
|
// });
|
||||||
theDataSet = this.parent.getCurrentDataset();
|
theDataSet = this.parent.getCurrentDataset();
|
||||||
tableViewAirportRD.setItems(FXCollections.observableArrayList(theDataSet.getAirports()));
|
tableViewAirportRD.setItems(FXCollections.observableArrayList(theDataSet.getAirports()));
|
||||||
|
|
||||||
|
airpDSTCBox.getItems().addAll("E", "A", "S", "O", "Z", "N", "U");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addAirportSingle() {
|
public void addAirportSingle() {
|
||||||
@@ -126,7 +132,7 @@ public class AirportRDController extends MenuController{
|
|||||||
airpLongitudeBox.getText(),
|
airpLongitudeBox.getText(),
|
||||||
airpAltitudeBox.getText(),
|
airpAltitudeBox.getText(),
|
||||||
airpTimezoneBox.getText(),
|
airpTimezoneBox.getText(),
|
||||||
airpDSTBox.getText(),
|
airpDSTCBox.getSelectionModel().getSelectedItem().toString(),
|
||||||
airpTzBox.getText());
|
airpTzBox.getText());
|
||||||
airpCityBox.clear();
|
airpCityBox.clear();
|
||||||
airpCountryBox.clear();
|
airpCountryBox.clear();
|
||||||
@@ -136,7 +142,7 @@ public class AirportRDController extends MenuController{
|
|||||||
airpLongitudeBox.clear();
|
airpLongitudeBox.clear();
|
||||||
airpAltitudeBox.clear();
|
airpAltitudeBox.clear();
|
||||||
airpTimezoneBox.clear();
|
airpTimezoneBox.clear();
|
||||||
airpDSTBox.clear();
|
airpDSTCBox.getSelectionModel().clearSelection();
|
||||||
airpTzBox.clear();
|
airpTzBox.clear();
|
||||||
tableViewAirportRD.setItems(FXCollections.observableArrayList(theDataSet.getAirports()));
|
tableViewAirportRD.setItems(FXCollections.observableArrayList(theDataSet.getAirports()));
|
||||||
} catch ( Exception e ) {
|
} catch ( Exception e ) {
|
||||||
|
|||||||
@@ -44,5 +44,48 @@ public class AirportSummaryController extends MenuController{
|
|||||||
currentData = this.parent.getCurrentDataset();
|
currentData = this.parent.getCurrentDataset();
|
||||||
tableView.setItems(FXCollections.observableArrayList(currentData.getAirports()));
|
tableView.setItems(FXCollections.observableArrayList(currentData.getAirports()));
|
||||||
}
|
}
|
||||||
|
public void airportRawDataButton() {
|
||||||
|
try {
|
||||||
|
AirportRDController rawDataController = (AirportRDController)
|
||||||
|
parent.replaceSceneContent("airport_raw_data.fxml");
|
||||||
|
rawDataController.setApp(parent);
|
||||||
|
rawDataController.loadTables();
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void flightSummaryButton() {
|
||||||
|
try {
|
||||||
|
FlightSummaryController summaryController = (FlightSummaryController)
|
||||||
|
parent.replaceSceneContent("flight_data_summary.fxml");
|
||||||
|
summaryController.setApp(parent);
|
||||||
|
summaryController.flightPathListView();
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void routeSummaryButton() {
|
||||||
|
try {
|
||||||
|
RouteSummaryController summaryController = (RouteSummaryController)
|
||||||
|
parent.replaceSceneContent("routes_summary.fxml");
|
||||||
|
summaryController.setApp(parent);
|
||||||
|
summaryController.loadTables();
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void airlineSummaryButton() {
|
||||||
|
try {
|
||||||
|
AirlineSummaryController summaryController = (AirlineSummaryController)
|
||||||
|
parent.replaceSceneContent("airline_summary.fxml");
|
||||||
|
summaryController.setApp(parent);
|
||||||
|
summaryController.loadTables();
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -72,6 +72,40 @@ public class FlightSummaryController implements Initializable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void airportSummaryButton() {
|
||||||
|
try {
|
||||||
|
AirportSummaryController summaryController = (AirportSummaryController)
|
||||||
|
parent.replaceSceneContent("airport_summary.fxml");
|
||||||
|
summaryController.setApp(parent);
|
||||||
|
summaryController.loadTables();
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void routeSummaryButton() {
|
||||||
|
try {
|
||||||
|
RouteSummaryController summaryController = (RouteSummaryController)
|
||||||
|
parent.replaceSceneContent("routes_summary.fxml");
|
||||||
|
summaryController.setApp(parent);
|
||||||
|
summaryController.loadTables();
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void airlineSummaryButton() {
|
||||||
|
try {
|
||||||
|
AirlineSummaryController summaryController = (AirlineSummaryController)
|
||||||
|
parent.replaceSceneContent("airline_summary.fxml");
|
||||||
|
summaryController.setApp(parent);
|
||||||
|
summaryController.loadTables();
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,7 @@ package seng202.group9.GUI;
|
|||||||
|
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.scene.control.Alert;
|
import javafx.scene.control.*;
|
||||||
import javafx.scene.control.TableColumn;
|
|
||||||
import javafx.scene.control.TableView;
|
|
||||||
import javafx.scene.control.TextField;
|
|
||||||
import javafx.scene.control.cell.PropertyValueFactory;
|
import javafx.scene.control.cell.PropertyValueFactory;
|
||||||
import seng202.group9.Controller.App;
|
import seng202.group9.Controller.App;
|
||||||
import seng202.group9.Controller.Dataset;
|
import seng202.group9.Controller.Dataset;
|
||||||
@@ -40,17 +37,11 @@ public class RouteRDController extends MenuController {
|
|||||||
@FXML
|
@FXML
|
||||||
private TextField rAirlineBox;
|
private TextField rAirlineBox;
|
||||||
@FXML
|
@FXML
|
||||||
private TextField rAirlineIDBox;
|
|
||||||
@FXML
|
|
||||||
private TextField rSourceBox;
|
private TextField rSourceBox;
|
||||||
@FXML
|
@FXML
|
||||||
private TextField rSourceIDBox;
|
|
||||||
@FXML
|
|
||||||
private TextField rDestBox;
|
private TextField rDestBox;
|
||||||
@FXML
|
@FXML
|
||||||
private TextField rDestIDBox;
|
private ComboBox<String> rCodeshareCBox;
|
||||||
@FXML
|
|
||||||
private TextField rCodeshareBox;
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField rStopsBox;
|
private TextField rStopsBox;
|
||||||
@FXML
|
@FXML
|
||||||
@@ -66,18 +57,20 @@ public class RouteRDController extends MenuController {
|
|||||||
private Dataset theDataSet = null;
|
private Dataset theDataSet = null;
|
||||||
|
|
||||||
public void loadTables() {
|
public void loadTables() {
|
||||||
rAirlineCol.setCellValueFactory(new PropertyValueFactory<Route, String>("Airline"));
|
rAirlineCol.setCellValueFactory(new PropertyValueFactory<Route, String>("AirlineName"));
|
||||||
//rAirlineIDCol.setCellValueFactory(new PropertyValueFactory<Route, String>("AirlineID"));
|
rAirlineIDCol.setCellValueFactory(new PropertyValueFactory<Route, String>("AirlineID"));
|
||||||
rSourceCol.setCellValueFactory(new PropertyValueFactory<Route, String>("DepartureAirport"));
|
rSourceCol.setCellValueFactory(new PropertyValueFactory<Route, String>("DepartureAirport"));
|
||||||
//rSourceIDCol.setCellValueFactory(new PropertyValueFactory<Route, String>("SourceID"));
|
rSourceIDCol.setCellValueFactory(new PropertyValueFactory<Route, String>("SourceID"));
|
||||||
rDestCol.setCellValueFactory(new PropertyValueFactory<Route, String>("ArrivalAirport"));
|
rDestCol.setCellValueFactory(new PropertyValueFactory<Route, String>("ArrivalAirport"));
|
||||||
//rDestIDCol.setCellValueFactory(new PropertyValueFactory<Route, String>("DestID"));
|
rDestIDCol.setCellValueFactory(new PropertyValueFactory<Route, String>("DestID"));
|
||||||
rCodeshareCol.setCellValueFactory(new PropertyValueFactory<Route, String>("Code"));
|
rCodeshareCol.setCellValueFactory(new PropertyValueFactory<Route, String>("Code"));
|
||||||
rStopsCol.setCellValueFactory(new PropertyValueFactory<Route, String>("Stops"));
|
rStopsCol.setCellValueFactory(new PropertyValueFactory<Route, String>("Stops"));
|
||||||
rEquipmentCol.setCellValueFactory(new PropertyValueFactory<Route, String>("Equipment"));
|
rEquipmentCol.setCellValueFactory(new PropertyValueFactory<Route, String>("Equipment"));
|
||||||
|
|
||||||
theDataSet = this.parent.getCurrentDataset();
|
theDataSet = this.parent.getCurrentDataset();
|
||||||
tableViewRouteRD.setItems(FXCollections.observableArrayList(theDataSet.getRoutes()));
|
tableViewRouteRD.setItems(FXCollections.observableArrayList(theDataSet.getRoutes()));
|
||||||
|
|
||||||
|
rCodeshareCBox.getItems().addAll("Y", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addRouteSingle() {
|
public void addRouteSingle() {
|
||||||
@@ -86,14 +79,14 @@ public class RouteRDController extends MenuController {
|
|||||||
rAirlineBox.getText(),
|
rAirlineBox.getText(),
|
||||||
rSourceBox.getText(),
|
rSourceBox.getText(),
|
||||||
rDestBox.getText(),
|
rDestBox.getText(),
|
||||||
rCodeshareBox.getText(),
|
rCodeshareCBox.getSelectionModel().getSelectedItem().toString(),
|
||||||
rStopsBox.getText(),
|
rStopsBox.getText(),
|
||||||
rEquipmentBox.getText()
|
rEquipmentBox.getText()
|
||||||
);
|
);
|
||||||
rAirlineBox.clear();
|
rAirlineBox.clear();
|
||||||
rSourceBox.clear();
|
rSourceBox.clear();
|
||||||
rDestBox.clear();
|
rDestBox.clear();
|
||||||
rCodeshareBox.clear();
|
rCodeshareCBox.getSelectionModel().clearSelection();
|
||||||
rStopsBox.clear();
|
rStopsBox.clear();
|
||||||
rEquipmentBox.clear();
|
rEquipmentBox.clear();
|
||||||
tableViewRouteRD.setItems(FXCollections.observableArrayList(theDataSet.getRoutes()));
|
tableViewRouteRD.setItems(FXCollections.observableArrayList(theDataSet.getRoutes()));
|
||||||
|
|||||||
@@ -43,5 +43,49 @@ public class RouteSummaryController extends MenuController{
|
|||||||
currentData = this.parent.getCurrentDataset();
|
currentData = this.parent.getCurrentDataset();
|
||||||
tableView.setItems(FXCollections.observableArrayList(currentData.getRoutes()));
|
tableView.setItems(FXCollections.observableArrayList(currentData.getRoutes()));
|
||||||
}
|
}
|
||||||
|
public void routeRawDataButton() {
|
||||||
|
try {
|
||||||
|
RouteRDController rawDataController = (RouteRDController)
|
||||||
|
parent.replaceSceneContent("route_raw_data.fxml");
|
||||||
|
rawDataController.setApp(parent);
|
||||||
|
rawDataController.loadTables();
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void flightSummaryButton() {
|
||||||
|
try {
|
||||||
|
FlightSummaryController summaryController = (FlightSummaryController)
|
||||||
|
parent.replaceSceneContent("flight_data_summary.fxml");
|
||||||
|
summaryController.setApp(parent);
|
||||||
|
summaryController.flightPathListView();
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void airportSummaryButton() {
|
||||||
|
try {
|
||||||
|
AirportSummaryController summaryController = (AirportSummaryController)
|
||||||
|
parent.replaceSceneContent("airport_summary.fxml");
|
||||||
|
summaryController.setApp(parent);
|
||||||
|
summaryController.loadTables();
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void airlineSummaryButton() {
|
||||||
|
try {
|
||||||
|
AirlineSummaryController summaryController = (AirlineSummaryController)
|
||||||
|
parent.replaceSceneContent("airline_summary.fxml");
|
||||||
|
summaryController.setApp(parent);
|
||||||
|
summaryController.loadTables();
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<?import javafx.geometry.Insets?>
|
<?import javafx.geometry.Insets?>
|
||||||
<?import javafx.scene.control.Button?>
|
<?import javafx.scene.control.Button?>
|
||||||
|
<?import javafx.scene.control.ComboBox?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
<?import javafx.scene.control.TableColumn?>
|
<?import javafx.scene.control.TableColumn?>
|
||||||
<?import javafx.scene.control.TableView?>
|
<?import javafx.scene.control.TableView?>
|
||||||
@@ -36,55 +37,51 @@
|
|||||||
<TableView fx:id="tableView" layoutX="1.0" prefHeight="403.0" prefWidth="765.0">
|
<TableView fx:id="tableView" layoutX="1.0" prefHeight="403.0" prefWidth="765.0">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn fx:id="airlIDcol" prefWidth="83.0" text="Airline ID" />
|
<TableColumn fx:id="airlIDcol" prefWidth="83.0" text="Airline ID" />
|
||||||
<TableColumn fx:id="airlNamecol" prefWidth="137.0" text="Name" />
|
<TableColumn fx:id="airlNamecol" prefWidth="450.0" text="Name" />
|
||||||
<TableColumn fx:id="airlAliascol" minWidth="0.0" prefWidth="129.0" text="Alias" />
|
<TableColumn fx:id="airlAliascol" minWidth="0.0" prefWidth="56.0" text="Alias" />
|
||||||
<TableColumn fx:id="airlIATAcol" minWidth="0.0" prefWidth="69.0" text="IATA" />
|
<TableColumn fx:id="airlIATAcol" minWidth="0.0" prefWidth="59.0" text="IATA" />
|
||||||
<TableColumn fx:id="airlICAOcol" minWidth="0.0" prefWidth="67.0" text="ICAO" />
|
<TableColumn fx:id="airlICAOcol" minWidth="0.0" prefWidth="68.0" text="ICAO" />
|
||||||
<TableColumn fx:id="airlCallsigncol" minWidth="0.0" prefWidth="93.0" text="Callsign" />
|
<TableColumn fx:id="airlCallsigncol" minWidth="0.0" prefWidth="400.0" text="Callsign" />
|
||||||
<TableColumn fx:id="airlCountrycol" minWidth="0.0" prefWidth="102.0" text="Country" />
|
<TableColumn fx:id="airlCountrycol" minWidth="0.0" prefWidth="200.0" text="Country" />
|
||||||
<TableColumn fx:id="airlActivecol" minWidth="8.0" prefWidth="84.0" text="Active" />
|
<TableColumn fx:id="airlActivecol" minWidth="8.0" prefWidth="66.0" text="Active" />
|
||||||
</columns>
|
</columns>
|
||||||
</TableView>
|
</TableView>
|
||||||
</children>
|
</children>
|
||||||
</Pane>
|
</Pane>
|
||||||
<Pane layoutX="14.0" layoutY="483.0" prefHeight="31.0" prefWidth="765.0">
|
<Pane layoutX="14.0" layoutY="483.0" prefHeight="31.0" prefWidth="765.0">
|
||||||
<children>
|
<children>
|
||||||
<TextField fx:id="airlNameBox" layoutX="97.0" layoutY="2.0" prefHeight="25.0" prefWidth="137.0" promptText="Name">
|
<TextField fx:id="airlNameBox" layoutX="97.0" layoutY="-1.0" prefHeight="31.0" prefWidth="137.0" promptText="Name">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="airlAliasBox" layoutX="234.0" layoutY="2.0" prefHeight="25.0" prefWidth="125.0" promptText="Alias">
|
<TextField fx:id="airlAliasBox" layoutX="234.0" layoutY="-1.0" prefHeight="31.0" prefWidth="69.0" promptText="Alias">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="airlIATABox" layoutX="359.0" layoutY="2.0" prefHeight="25.0" prefWidth="67.0" promptText="IATA">
|
<TextField fx:id="airlIATABox" layoutX="303.0" layoutY="-1.0" prefHeight="31.0" prefWidth="69.0" promptText="IATA">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="airlICAOBox" layoutX="426.0" layoutY="2.0" prefHeight="25.0" prefWidth="69.0" promptText="ICAO">
|
<TextField fx:id="airlICAOBox" layoutX="372.0" layoutY="-1.0" prefHeight="31.0" prefWidth="69.0" promptText="ICAO">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="airlCallsignBox" layoutX="495.0" layoutY="2.0" prefHeight="25.0" prefWidth="84.0" promptText="Callsign">
|
<TextField fx:id="airlCallsignBox" layoutX="441.0" layoutY="-1.0" prefHeight="31.0" prefWidth="84.0" promptText="Callsign">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="airlCountryBox" layoutX="579.0" layoutY="2.0" prefHeight="25.0" prefWidth="102.0" promptText="Country">
|
<TextField fx:id="airlCountryBox" layoutX="525.0" layoutY="-1.0" prefHeight="31.0" prefWidth="137.0" promptText="Country">
|
||||||
<padding>
|
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<TextField fx:id="airlActiveBox" layoutX="681.0" layoutY="2.0" prefHeight="25.0" prefWidth="84.0" promptText="Active">
|
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<Label layoutY="2.0" prefHeight="25.0" prefWidth="93.0" text="Enter Values:" />
|
<Label layoutY="2.0" prefHeight="25.0" prefWidth="93.0" text="Enter Values:" />
|
||||||
|
<ComboBox fx:id="airlActiveCBox" layoutX="662.0" layoutY="-1.0" prefHeight="31.0" prefWidth="102.0" promptText="Active" />
|
||||||
</children>
|
</children>
|
||||||
</Pane>
|
</Pane>
|
||||||
</children>
|
</children>
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<?import javafx.geometry.Insets?>
|
<?import javafx.geometry.Insets?>
|
||||||
<?import javafx.scene.control.Button?>
|
<?import javafx.scene.control.Button?>
|
||||||
<?import javafx.scene.control.ScrollPane?>
|
<?import javafx.scene.control.ScrollPane?>
|
||||||
<?import javafx.scene.control.TableColumn?>
|
<?import javafx.scene.control.TableColumn?>
|
||||||
<?import javafx.scene.control.TableView?>
|
<?import javafx.scene.control.TableView?>
|
||||||
<?import javafx.scene.layout.AnchorPane?>
|
<?import javafx.scene.layout.AnchorPane?>
|
||||||
<?import javafx.scene.layout.HBox?>
|
<?import javafx.scene.layout.HBox?>
|
||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.Pane?>
|
||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
<?import javafx.scene.shape.Rectangle?>
|
<?import javafx.scene.shape.Rectangle?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
<?import javafx.scene.text.Text?>
|
<?import javafx.scene.text.Text?>
|
||||||
|
|
||||||
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.45" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.AirlineSummaryController">
|
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.45" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.AirlineSummaryController">
|
||||||
<children>
|
<children>
|
||||||
@@ -34,16 +34,18 @@
|
|||||||
</Pane>
|
</Pane>
|
||||||
<Pane layoutY="52.0" prefHeight="240.0" prefWidth="480.0" AnchorPane.bottomAnchor="0.0">
|
<Pane layoutY="52.0" prefHeight="240.0" prefWidth="480.0" AnchorPane.bottomAnchor="0.0">
|
||||||
<children>
|
<children>
|
||||||
<Pane layoutX="25.0" layoutY="10.0" prefHeight="220.0" prefWidth="120.0" />
|
<Pane layoutX="25.0" layoutY="10.0" prefHeight="220.0" prefWidth="120.0">
|
||||||
<TableView fx:id="tableView" layoutX="10.0" layoutY="10.0" prefHeight="200.0" prefWidth="378.0">
|
<children>
|
||||||
<columns>
|
<TableView fx:id="tableView" prefHeight="200.0" prefWidth="378.0">
|
||||||
<TableColumn fx:id="columnName" text="Name" />
|
<columns>
|
||||||
<TableColumn fx:id="columnAlias" prefWidth="77.0" text="Alias" />
|
<TableColumn fx:id="columnName" maxWidth="100.0" prefWidth="50.0" text="Name" />
|
||||||
<TableColumn fx:id="columnCountry" prefWidth="86.0" text="Country" />
|
<TableColumn fx:id="columnAlias" prefWidth="77.0" text="Alias" />
|
||||||
<TableColumn fx:id="columnIATA" prefWidth="86.0" text="IATA/FAA" />
|
<TableColumn fx:id="columnCountry" prefWidth="86.0" text="Country" />
|
||||||
<TableColumn fx:id="columnActive" prefWidth="46.0" text="Active" />
|
<TableColumn fx:id="columnIATA" prefWidth="86.0" text="IATA/FAA" />
|
||||||
</columns>
|
<TableColumn fx:id="columnActive" prefWidth="46.0" text="Active" />
|
||||||
</TableView>
|
</columns>
|
||||||
|
</TableView>
|
||||||
|
</children></Pane>
|
||||||
</children>
|
</children>
|
||||||
<padding>
|
<padding>
|
||||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||||
@@ -54,24 +56,24 @@
|
|||||||
<AnchorPane prefHeight="300.0" prefWidth="253.0">
|
<AnchorPane prefHeight="300.0" prefWidth="253.0">
|
||||||
<children>
|
<children>
|
||||||
<Pane layoutY="200.0" prefHeight="100.0" prefWidth="253.0">
|
<Pane layoutY="200.0" prefHeight="100.0" prefWidth="253.0">
|
||||||
<children>
|
<children>
|
||||||
<Button layoutX="20.0" layoutY="14.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Airports">
|
<Button layoutX="20.0" layoutY="14.0" mnemonicParsing="false" onAction="#airportSummaryButton" prefHeight="25.0" prefWidth="65.0" text="Airports">
|
||||||
<font>
|
<font>
|
||||||
<Font size="12.0" />
|
<Font size="12.0" />
|
||||||
</font>
|
</font>
|
||||||
</Button>
|
</Button>
|
||||||
<Button layoutX="94.0" layoutY="14.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Routes">
|
<Button layoutX="94.0" layoutY="14.0" mnemonicParsing="false" onAction="#routeSummaryButton" prefHeight="25.0" prefWidth="65.0" text="Routes">
|
||||||
<font>
|
<font>
|
||||||
<Font size="12.0" />
|
<Font size="12.0" />
|
||||||
</font>
|
</font>
|
||||||
</Button>
|
</Button>
|
||||||
<Button layoutX="169.0" layoutY="14.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Flights">
|
<Button layoutX="169.0" layoutY="14.0" mnemonicParsing="false" onAction="#flightSummaryButton" prefHeight="25.0" prefWidth="65.0" text="Flights">
|
||||||
<font>
|
<font>
|
||||||
<Font size="12.0" />
|
<Font size="12.0" />
|
||||||
</font>
|
</font>
|
||||||
</Button>
|
</Button>
|
||||||
<Button layoutX="20.0" layoutY="61.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="214.0" text="Airline Raw Data" />
|
<Button layoutX="20.0" layoutY="61.0" mnemonicParsing="false" onAction="#airlineRawDataButton" prefHeight="25.0" prefWidth="214.0" text="Airline Raw Data" />
|
||||||
</children>
|
</children>
|
||||||
<padding>
|
<padding>
|
||||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||||
</padding>
|
</padding>
|
||||||
@@ -91,4 +93,4 @@
|
|||||||
</content>
|
</content>
|
||||||
</ScrollPane>
|
</ScrollPane>
|
||||||
</children>
|
</children>
|
||||||
</VBox>
|
</VBox>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<?import javafx.geometry.Insets?>
|
<?import javafx.geometry.Insets?>
|
||||||
<?import javafx.scene.control.Button?>
|
<?import javafx.scene.control.Button?>
|
||||||
|
<?import javafx.scene.control.ComboBox?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
<?import javafx.scene.control.ScrollPane?>
|
<?import javafx.scene.control.ScrollPane?>
|
||||||
<?import javafx.scene.control.TableColumn?>
|
<?import javafx.scene.control.TableColumn?>
|
||||||
@@ -30,66 +31,62 @@
|
|||||||
<Font size="29.0" />
|
<Font size="29.0" />
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
<ScrollPane hbarPolicy="ALWAYS" layoutX="14.0" layoutY="474.0" prefHeight="47.0" prefViewportHeight="29.0" prefViewportWidth="1095.0" prefWidth="772.0" vbarPolicy="NEVER">
|
<ScrollPane hbarPolicy="ALWAYS" layoutX="14.0" layoutY="469.0" prefHeight="54.0" prefViewportHeight="29.0" prefViewportWidth="1095.0" prefWidth="772.0" vbarPolicy="NEVER">
|
||||||
<content>
|
<content>
|
||||||
<Pane prefHeight="29.0" prefWidth="1219.0">
|
<Pane prefHeight="39.0" prefWidth="1633.0">
|
||||||
<children>
|
<children>
|
||||||
<TextField fx:id="airpNameBox" layoutX="89.0" layoutY="2.0" prefHeight="25.0" prefWidth="137.0" promptText="Name">
|
<TextField fx:id="airpNameBox" layoutX="89.0" layoutY="4.0" prefHeight="31.0" prefWidth="350.0" promptText="Name">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="airpCityBox" layoutX="226.0" layoutY="2.0" prefHeight="25.0" prefWidth="129.0" promptText="City">
|
<TextField fx:id="airpCityBox" layoutX="439.0" layoutY="4.0" prefHeight="31.0" prefWidth="200.0" promptText="City">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="airpCountryBox" layoutX="355.0" layoutY="2.0" prefHeight="25.0" prefWidth="96.0" promptText="Country">
|
<TextField fx:id="airpCountryBox" layoutX="639.0" layoutY="4.0" prefHeight="31.0" prefWidth="200.0" promptText="Country">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="airpIATAFFABox" layoutX="451.0" layoutY="2.0" prefHeight="25.0" prefWidth="87.0" promptText="IATA/FAA">
|
<TextField fx:id="airpIATAFFABox" layoutX="839.0" layoutY="4.0" prefHeight="31.0" prefWidth="87.0" promptText="IATA/FAA">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="airpICAOBox" layoutX="538.0" layoutY="2.0" prefHeight="25.0" prefWidth="48.0" promptText="ICAO">
|
<TextField fx:id="airpICAOBox" layoutX="926.0" layoutY="4.0" prefHeight="31.0" prefWidth="48.0" promptText="ICAO">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="airpLatitudeBox" layoutX="586.0" layoutY="2.0" prefHeight="25.0" prefWidth="82.0" promptText="Latitude">
|
<TextField fx:id="airpLatitudeBox" layoutX="974.0" layoutY="4.0" prefHeight="31.0" prefWidth="100.0" promptText="Latitude">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="airpLongitudeBox" layoutX="668.0" layoutY="2.0" prefHeight="25.0" prefWidth="92.0" promptText="Longitude">
|
<TextField fx:id="airpLongitudeBox" layoutX="1074.0" layoutY="3.0" prefHeight="31.0" prefWidth="100.0" promptText="Longitude">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="airpAltitudeBox" layoutX="760.0" layoutY="2.0" prefHeight="25.0" prefWidth="78.0" promptText="Altitude">
|
<TextField fx:id="airpAltitudeBox" layoutX="1174.0" layoutY="3.0" prefHeight="31.0" prefWidth="75.0" promptText="Altitude">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="airpTimezoneBox" layoutX="838.0" layoutY="2.0" prefHeight="25.0" prefWidth="80.0" promptText="Timezone">
|
<TextField fx:id="airpTimezoneBox" layoutX="1249.0" layoutY="3.0" prefHeight="31.0" prefWidth="100.0" promptText="Timezone">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="airpTzBox" layoutX="1023.0" layoutY="3.0" prefHeight="25.0" prefWidth="182.0" promptText="Tz database time zone">
|
<TextField fx:id="airpTzBox" layoutX="1432.0" layoutY="3.0" prefHeight="31.0" prefWidth="200.0" promptText="Tz database time zone">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="airpDSTBox" layoutX="918.0" layoutY="2.0" prefHeight="25.0" prefWidth="102.0" promptText="DST">
|
<Label layoutX="2.0" layoutY="7.0" prefHeight="25.0" prefWidth="87.0" text="Enter Values:" />
|
||||||
<padding>
|
<ComboBox fx:id="airpDSTCBox" layoutX="1349.0" layoutY="3.0" prefHeight="31.0" prefWidth="83.0" promptText="DST" />
|
||||||
<Insets left="2.0" right="2.0" />
|
|
||||||
</padding>
|
|
||||||
</TextField>
|
|
||||||
<Label layoutY="2.0" prefHeight="25.0" prefWidth="87.0" text="Enter Values:" />
|
|
||||||
</children>
|
</children>
|
||||||
</Pane>
|
</Pane>
|
||||||
</content>
|
</content>
|
||||||
@@ -100,18 +97,18 @@
|
|||||||
<children>
|
<children>
|
||||||
<TableView fx:id="tableViewAirportRD" prefHeight="403.0" prefWidth="772.0">
|
<TableView fx:id="tableViewAirportRD" prefHeight="403.0" prefWidth="772.0">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn fx:id="airpIDcol" prefWidth="83.0" text="Airport ID" />
|
<TableColumn fx:id="airpIDcol" prefWidth="81.00003051757812" text="Airport ID" />
|
||||||
<TableColumn fx:id="airpNamecol" prefWidth="137.0" text="Name" />
|
<TableColumn fx:id="airpNamecol" prefWidth="350.0" text="Name" />
|
||||||
<TableColumn fx:id="airpCitycol" minWidth="0.0" prefWidth="129.0" text="City" />
|
<TableColumn fx:id="airpCitycol" minWidth="0.0" prefWidth="200.0" text="City" />
|
||||||
<TableColumn fx:id="airpCountrycol" minWidth="0.0" prefWidth="96.0" text="Country" />
|
<TableColumn fx:id="airpCountrycol" minWidth="0.0" prefWidth="200.0" text="Country" />
|
||||||
<TableColumn fx:id="airpIATAFFAcol" minWidth="0.0" prefWidth="87.0" text="IATA/FAA" />
|
<TableColumn fx:id="airpIATAFFAcol" minWidth="0.0" text="IATA/FAA" />
|
||||||
<TableColumn fx:id="airpICAOcol" minWidth="0.0" prefWidth="48.0" text="ICAO" />
|
<TableColumn fx:id="airpICAOcol" minWidth="0.0" prefWidth="58.0" text="ICAO" />
|
||||||
<TableColumn fx:id="airpLatitudecol" minWidth="0.0" prefWidth="82.0" text="Latitude" />
|
<TableColumn fx:id="airpLatitudecol" minWidth="0.0" prefWidth="100.0" text="Latitude" />
|
||||||
<TableColumn fx:id="airpLongitudecol" minWidth="8.0" prefWidth="92.0" text="Longitude" />
|
<TableColumn fx:id="airpLongitudecol" minWidth="8.0" prefWidth="100.0" text="Longitude" />
|
||||||
<TableColumn fx:id="airpAltitudecol" minWidth="0.0" prefWidth="78.0" text="Altitude" />
|
<TableColumn fx:id="airpAltitudecol" minWidth="0.0" prefWidth="75.0" text="Altitude" />
|
||||||
<TableColumn fx:id="airpTimezonecol" minWidth="0.0" text="Timezone" />
|
<TableColumn fx:id="airpTimezonecol" minWidth="0.0" prefWidth="100.0" text="Timezone" />
|
||||||
<TableColumn fx:id="airpDSTcol" prefWidth="102.0" text="DST" />
|
<TableColumn fx:id="airpDSTcol" prefWidth="55.0" text="DST" />
|
||||||
<TableColumn fx:id="airpTzcol" minWidth="0.0" prefWidth="182.0" text="Tz database time zone" />
|
<TableColumn fx:id="airpTzcol" minWidth="0.0" prefWidth="200.0" text="Tz database time zone" />
|
||||||
</columns>
|
</columns>
|
||||||
</TableView>
|
</TableView>
|
||||||
</children></Pane>
|
</children></Pane>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
<children>
|
<children>
|
||||||
<TableView fx:id="tableView" layoutX="10.0" layoutY="10.0" prefHeight="200.0" prefWidth="378.0">
|
<TableView fx:id="tableView" layoutX="10.0" layoutY="10.0" prefHeight="200.0" prefWidth="378.0">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn fx:id="columnName" prefWidth="75.0" text="Name" />
|
<TableColumn fx:id="columnName" maxWidth="150.0" prefWidth="75.0" text="Name" />
|
||||||
<TableColumn fx:id="columnCity" prefWidth="75.0" text="City" />
|
<TableColumn fx:id="columnCity" prefWidth="75.0" text="City" />
|
||||||
<TableColumn fx:id="columnCountry" prefWidth="75.0" text="Country" />
|
<TableColumn fx:id="columnCountry" prefWidth="75.0" text="Country" />
|
||||||
<TableColumn fx:id="columnAltitude" prefWidth="75.0" text="Altitude" />
|
<TableColumn fx:id="columnAltitude" prefWidth="75.0" text="Altitude" />
|
||||||
@@ -58,22 +58,22 @@
|
|||||||
<children>
|
<children>
|
||||||
<Pane layoutY="200.0" prefHeight="100.0" prefWidth="253.0">
|
<Pane layoutY="200.0" prefHeight="100.0" prefWidth="253.0">
|
||||||
<children>
|
<children>
|
||||||
<Button layoutX="20.0" layoutY="14.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Routes">
|
<Button layoutX="20.0" layoutY="14.0" mnemonicParsing="false" onAction="#airlineSummaryButton" prefHeight="25.0" prefWidth="65.0" text="Airline">
|
||||||
<font>
|
<font>
|
||||||
<Font size="12.0" />
|
<Font size="12.0" />
|
||||||
</font>
|
</font>
|
||||||
</Button>
|
</Button>
|
||||||
<Button layoutX="94.0" layoutY="14.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Airlines">
|
<Button layoutX="94.0" layoutY="14.0" mnemonicParsing="false" onAction="#routeSummaryButton" prefHeight="25.0" prefWidth="65.0" text="Routes">
|
||||||
<font>
|
<font>
|
||||||
<Font size="12.0" />
|
<Font size="12.0" />
|
||||||
</font>
|
</font>
|
||||||
</Button>
|
</Button>
|
||||||
<Button layoutX="169.0" layoutY="14.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Flights">
|
<Button layoutX="169.0" layoutY="14.0" mnemonicParsing="false" onAction="#flightSummaryButton" prefHeight="25.0" prefWidth="65.0" text="Flights">
|
||||||
<font>
|
<font>
|
||||||
<Font size="12.0" />
|
<Font size="12.0" />
|
||||||
</font>
|
</font>
|
||||||
</Button>
|
</Button>
|
||||||
<Button layoutX="20.0" layoutY="61.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="214.0" text="Airport Raw Data" />
|
<Button layoutX="20.0" layoutY="61.0" mnemonicParsing="false" onAction="#airportRawDataButton" prefHeight="25.0" prefWidth="214.0" text="Airport Raw Data" />
|
||||||
</children>
|
</children>
|
||||||
<padding>
|
<padding>
|
||||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||||
@@ -94,4 +94,4 @@
|
|||||||
</content>
|
</content>
|
||||||
</ScrollPane>
|
</ScrollPane>
|
||||||
</children>
|
</children>
|
||||||
</VBox>
|
</VBox>
|
||||||
|
|||||||
@@ -83,24 +83,24 @@
|
|||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<Pane prefHeight="160.0" prefWidth="295.0" GridPane.rowIndex="1">
|
<Pane prefHeight="160.0" prefWidth="295.0" GridPane.rowIndex="1">
|
||||||
<children>
|
<children>
|
||||||
<Button layoutX="33.0" layoutY="82.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Airports">
|
<Button layoutX="20.0" layoutY="14.0" mnemonicParsing="false" onAction="#airportSummaryButton" prefHeight="25.0" prefWidth="65.0" text="Airports">
|
||||||
<font>
|
<font>
|
||||||
<Font size="12.0" />
|
<Font size="12.0" />
|
||||||
</font>
|
</font>
|
||||||
</Button>
|
</Button>
|
||||||
<Button layoutX="126.0" layoutY="81.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Routes">
|
<Button layoutX="94.0" layoutY="14.0" mnemonicParsing="false" onAction="#airlineSummaryButton" prefHeight="25.0" prefWidth="65.0" text="Airlines">
|
||||||
<font>
|
<font>
|
||||||
<Font size="12.0" />
|
<Font size="12.0" />
|
||||||
</font>
|
</font>
|
||||||
</Button>
|
</Button>
|
||||||
<Button layoutX="218.0" layoutY="81.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Airlines">
|
<Button layoutX="169.0" layoutY="14.0" mnemonicParsing="false" onAction="#routeSummaryButton" prefHeight="25.0" prefWidth="65.0" text="Routes">
|
||||||
<font>
|
<font>
|
||||||
<Font size="12.0" />
|
<Font size="12.0" />
|
||||||
</font>
|
</font>
|
||||||
</Button>
|
</Button>
|
||||||
<Button layoutX="33.0" layoutY="129.0" mnemonicParsing="false" onAction="#handleRawDataButton" prefHeight="25.0" prefWidth="250.0" text="Flight Raw Data" />
|
<Button layoutX="20.0" layoutY="61.0" mnemonicParsing="false" onAction="#handleRawDataButton" prefHeight="25.0" prefWidth="214.0" text="Flights Raw Data" />
|
||||||
</children>
|
</children>
|
||||||
<padding>
|
<padding>
|
||||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||||
</padding>
|
</padding>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<?import javafx.geometry.Insets?>
|
<?import javafx.geometry.Insets?>
|
||||||
<?import javafx.scene.control.Button?>
|
<?import javafx.scene.control.Button?>
|
||||||
|
<?import javafx.scene.control.ComboBox?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
<?import javafx.scene.control.TableColumn?>
|
<?import javafx.scene.control.TableColumn?>
|
||||||
<?import javafx.scene.control.TableView?>
|
<?import javafx.scene.control.TableView?>
|
||||||
@@ -50,37 +51,33 @@
|
|||||||
</Pane>
|
</Pane>
|
||||||
<Pane layoutX="16.0" layoutY="479.0" prefHeight="32.0" prefWidth="765.0">
|
<Pane layoutX="16.0" layoutY="479.0" prefHeight="32.0" prefWidth="765.0">
|
||||||
<children>
|
<children>
|
||||||
<TextField fx:id="rAirlineBox" layoutX="90.0" layoutY="2.0" prefHeight="25.0" prefWidth="100.0" promptText="Airline">
|
<TextField fx:id="rAirlineBox" layoutX="90.0" layoutY="-1.0" prefHeight="31.0" prefWidth="100.0" promptText="Airline">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="rSourceBox" layoutX="190.0" layoutY="2.0" prefHeight="25.0" prefWidth="150.0" promptText="Source airport">
|
<TextField fx:id="rSourceBox" layoutX="190.0" layoutY="-1.0" prefHeight="31.0" prefWidth="150.0" promptText="Source airport">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="rDestBox" layoutX="340.0" layoutY="2.0" prefHeight="25.0" prefWidth="150.0" promptText="Destination airport">
|
<TextField fx:id="rDestBox" layoutX="340.0" layoutY="-1.0" prefHeight="31.0" prefWidth="150.0" promptText="Destination airport">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="rCodeshareBox" layoutX="490.0" layoutY="2.0" prefHeight="25.0" prefWidth="100.0" promptText="Codeshare">
|
<TextField fx:id="rStopsBox" layoutX="590.0" layoutY="-1.0" prefHeight="31.0" prefWidth="75.0" promptText="Stops">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="rStopsBox" layoutX="590.0" layoutY="2.0" prefHeight="25.0" prefWidth="75.0" promptText="Stops">
|
<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>
|
|
||||||
<TextField fx:id="rEquipmentBox" layoutX="665.0" layoutY="2.0" prefHeight="25.0" prefWidth="100.0" promptText="Equipment">
|
|
||||||
<padding>
|
<padding>
|
||||||
<Insets left="2.0" right="2.0" />
|
<Insets left="2.0" right="2.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</TextField>
|
</TextField>
|
||||||
<Label layoutY="4.0" text="Enter Values:" />
|
<Label layoutY="4.0" text="Enter Values:" />
|
||||||
|
<ComboBox fx:id="rCodeshareCBox" layoutX="490.0" layoutY="-1.0" prefHeight="31.0" prefWidth="100.0" promptText="Codeshare" />
|
||||||
</children>
|
</children>
|
||||||
</Pane>
|
</Pane>
|
||||||
</children>
|
</children>
|
||||||
|
|||||||
@@ -38,11 +38,11 @@
|
|||||||
<children>
|
<children>
|
||||||
<TableView fx:id="tableView" prefHeight="200.0" prefWidth="378.0">
|
<TableView fx:id="tableView" prefHeight="200.0" prefWidth="378.0">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn fx:id="columnAirline" prefWidth="75.0" text="Airline" />
|
<TableColumn fx:id="columnAirline" prefWidth="89.0" text="Airline" />
|
||||||
<TableColumn fx:id="columnDepart" prefWidth="75.0" text="Depart" />
|
<TableColumn fx:id="columnDepart" prefWidth="80.99998474121094" text="Depart" />
|
||||||
<TableColumn fx:id="columnArrive" prefWidth="75.0" text="Arrive" />
|
<TableColumn fx:id="columnArrive" prefWidth="67.0" text="Arrive" />
|
||||||
<TableColumn fx:id="columnStops" prefWidth="75.0" text="Stops" />
|
<TableColumn fx:id="columnStops" prefWidth="72.0" text="Stops" />
|
||||||
<TableColumn fx:id="columnEquipment" prefWidth="75.0" text="Equipment" />
|
<TableColumn fx:id="columnEquipment" prefWidth="66.0" text="Equipment" />
|
||||||
</columns>
|
</columns>
|
||||||
</TableView>
|
</TableView>
|
||||||
</children>
|
</children>
|
||||||
@@ -58,22 +58,22 @@
|
|||||||
<children>
|
<children>
|
||||||
<Pane layoutY="200.0" prefHeight="100.0" prefWidth="253.0">
|
<Pane layoutY="200.0" prefHeight="100.0" prefWidth="253.0">
|
||||||
<children>
|
<children>
|
||||||
<Button layoutX="20.0" layoutY="14.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Airports">
|
<Button layoutX="20.0" layoutY="14.0" mnemonicParsing="false" onAction="#airportSummaryButton" prefHeight="25.0" prefWidth="65.0" text="Airports">
|
||||||
<font>
|
<font>
|
||||||
<Font size="12.0" />
|
<Font size="12.0" />
|
||||||
</font>
|
</font>
|
||||||
</Button>
|
</Button>
|
||||||
<Button layoutX="94.0" layoutY="14.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Airlines">
|
<Button layoutX="94.0" layoutY="14.0" mnemonicParsing="false" onAction="#airlineSummaryButton" prefHeight="25.0" prefWidth="65.0" text="Airlines">
|
||||||
<font>
|
<font>
|
||||||
<Font size="12.0" />
|
<Font size="12.0" />
|
||||||
</font>
|
</font>
|
||||||
</Button>
|
</Button>
|
||||||
<Button layoutX="169.0" layoutY="14.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Flights">
|
<Button layoutX="169.0" layoutY="14.0" mnemonicParsing="false" onAction="#flightSummaryButton" prefHeight="25.0" prefWidth="65.0" text="Flights">
|
||||||
<font>
|
<font>
|
||||||
<Font size="12.0" />
|
<Font size="12.0" />
|
||||||
</font>
|
</font>
|
||||||
</Button>
|
</Button>
|
||||||
<Button layoutX="20.0" layoutY="61.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="214.0" text="Routes Raw Data" />
|
<Button layoutX="20.0" layoutY="61.0" mnemonicParsing="false" onAction="#routeRawDataButton" prefHeight="25.0" prefWidth="214.0" text="Routes Raw Data" />
|
||||||
</children>
|
</children>
|
||||||
<padding>
|
<padding>
|
||||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||||
@@ -94,4 +94,4 @@
|
|||||||
</content>
|
</content>
|
||||||
</ScrollPane>
|
</ScrollPane>
|
||||||
</children>
|
</children>
|
||||||
</VBox>
|
</VBox>
|
||||||
|
|||||||
Reference in New Issue
Block a user