Added Raw Data loader for Airline
This commit is contained in:
Binary file not shown.
@@ -39,6 +39,8 @@ public class App extends Application
|
|||||||
public void start(Stage primaryStage) {
|
public void start(Stage primaryStage) {
|
||||||
this.primaryStage = primaryStage;
|
this.primaryStage = primaryStage;
|
||||||
try {
|
try {
|
||||||
|
MenuController menuController = new MenuController();
|
||||||
|
menuController.setApp(this);
|
||||||
replaceSceneContent("menu.fxml");//replace this to check your fxml file
|
replaceSceneContent("menu.fxml");//replace this to check your fxml file
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -76,7 +78,7 @@ public class App extends Application
|
|||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private Initializable replaceSceneContent(String fxml) throws Exception {
|
public Initializable replaceSceneContent(String fxml) throws Exception {
|
||||||
FXMLLoader loader = new FXMLLoader();
|
FXMLLoader loader = new FXMLLoader();
|
||||||
InputStream in = getClass().getClassLoader().getResourceAsStream(fxml);
|
InputStream in = getClass().getClassLoader().getResourceAsStream(fxml);
|
||||||
InputStream menuIn = getClass().getClassLoader().getResourceAsStream("menu.fxml");
|
InputStream menuIn = getClass().getClassLoader().getResourceAsStream("menu.fxml");
|
||||||
|
|||||||
@@ -7,10 +7,11 @@ import javax.swing.JOptionPane;
|
|||||||
|
|
||||||
import javafx.application.Application;
|
import javafx.application.Application;
|
||||||
import javafx.fxml.Initializable;
|
import javafx.fxml.Initializable;
|
||||||
|
import seng202.group9.Controller.App;
|
||||||
|
|
||||||
public class MenuController implements Initializable{
|
public class MenuController implements Initializable{
|
||||||
|
|
||||||
Application parent;
|
App parent;
|
||||||
|
|
||||||
public void importAirports(){
|
public void importAirports(){
|
||||||
JOptionPane.showMessageDialog(null, "This is not Implemented yet");
|
JOptionPane.showMessageDialog(null, "This is not Implemented yet");
|
||||||
@@ -28,13 +29,24 @@ public class MenuController implements Initializable{
|
|||||||
JOptionPane.showMessageDialog(null, "This is not Implemented yet");
|
JOptionPane.showMessageDialog(null, "This is not Implemented yet");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load Airline Raw Data Function.
|
||||||
|
*/
|
||||||
|
public void loadAirlineRaw(){
|
||||||
|
try {
|
||||||
|
parent.replaceSceneContent("airline_raw_data.fxml");
|
||||||
|
} 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
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setApp(Application parent){
|
public void setApp(App parent){
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user