Added back in the GUI implementation for the flight raw data and summary viewer which was lost / changed earlier. Also in the process of updating their fxml files to improve the GUI
This commit is contained in:
@@ -49,11 +49,12 @@ public class App extends Application
|
||||
primaryStage.sizeToScene();
|
||||
MenuController menuController = (MenuController) loader.getController();
|
||||
menuController.setApp(this);
|
||||
replaceSceneContent("menu.fxml");//replace this to check your fxml file
|
||||
//replaceSceneContent("flight_raw_data.fxml");//replace this to check your fxml file
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
primaryStage.show();
|
||||
/*
|
||||
//testing out dataset
|
||||
try {
|
||||
currentDataset = new Dataset("test's", Dataset.getExisting);
|
||||
@@ -78,6 +79,7 @@ public class App extends Application
|
||||
} catch (DataException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package seng202.group9.GUI;
|
||||
|
||||
import javafx.fxml.Initializable;
|
||||
import seng202.group9.Controller.App;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
/**
|
||||
* Created by Liam Beckett on 13/09/2016.
|
||||
*/
|
||||
public class FlightRawDataController implements Initializable {
|
||||
|
||||
App parent;
|
||||
|
||||
public void setApp(App parent){
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package seng202.group9.GUI;
|
||||
|
||||
import javafx.fxml.Initializable;
|
||||
import seng202.group9.Controller.App;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
/**
|
||||
* Created by Liam Beckett on 13/09/2016.
|
||||
*/
|
||||
public class FlightSummaryController implements Initializable {
|
||||
|
||||
App parent;
|
||||
|
||||
public void setApp(App parent){
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import java.util.ResourceBundle;
|
||||
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.layout.BorderPane;
|
||||
@@ -36,7 +35,7 @@ public class MenuController implements Initializable{
|
||||
/**
|
||||
* Load Airline Raw Data Function.
|
||||
*/
|
||||
public void loadAirlineRaw() {
|
||||
public void viewAirlineRawData() {
|
||||
try {
|
||||
parent.replaceSceneContent("menu.fxml");
|
||||
System.out.println("Loaded Airline Raw Data.");
|
||||
@@ -49,31 +48,30 @@ public class MenuController implements Initializable{
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load Flight Summary Function.
|
||||
*/
|
||||
public void viewFlightSummary() {
|
||||
Stage stage = new Stage();
|
||||
BorderPane root = new BorderPane(); //root panel
|
||||
Scene scene = new Scene(root);
|
||||
//create the Flight summary page
|
||||
FlightDataSummary flightSummPage = new FlightDataSummary();
|
||||
root.setTop(flightSummPage.getFlightSummary());
|
||||
stage.setScene(scene);
|
||||
stage.show();
|
||||
//seng202.group9.Controller.App.primaryStage.setScene(scene);
|
||||
//seng202.group9.Controller.App.primaryStage.show();
|
||||
try {
|
||||
FlightSummaryController summaryController = (FlightSummaryController)
|
||||
parent.replaceSceneContent("flight_data_summary.fxml");
|
||||
summaryController.setApp(parent);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load Flight Raw Data Function.
|
||||
*/
|
||||
public void viewFlightRawData() {
|
||||
|
||||
Stage stage = new Stage();
|
||||
BorderPane root = new BorderPane(); //root panel
|
||||
Scene scene = new Scene(root);
|
||||
//create the Flight summary page
|
||||
FlightRawData flightRawDataPage = new FlightRawData();
|
||||
root.setTop(flightRawDataPage.getFlightRawData());
|
||||
stage.setScene(scene);
|
||||
stage.show();
|
||||
//seng202.group9.Controller.App.primaryStage.setScene(scene);
|
||||
//seng202.group9.Controller.App.primaryStage.show();
|
||||
try {
|
||||
FlightRawDataController rawDataController = (FlightRawDataController)
|
||||
parent.replaceSceneContent("flight_raw_data.fxml");
|
||||
rawDataController.setApp(parent);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user