Added Redirection to SUmmary pages after Import.
This commit is contained in:
Binary file not shown.
@@ -27,6 +27,7 @@ public class App extends Application
|
|||||||
private Stage primaryStage = null;
|
private Stage primaryStage = null;
|
||||||
private VBox mainContainer;
|
private VBox mainContainer;
|
||||||
private Session session;
|
private Session session;
|
||||||
|
private MenuController menuController;
|
||||||
|
|
||||||
public static void main( String[] args )
|
public static void main( String[] args )
|
||||||
{
|
{
|
||||||
@@ -53,7 +54,7 @@ public class App extends Application
|
|||||||
primaryStage.setResizable(false);
|
primaryStage.setResizable(false);
|
||||||
primaryStage.setScene(scene);
|
primaryStage.setScene(scene);
|
||||||
primaryStage.sizeToScene();
|
primaryStage.sizeToScene();
|
||||||
MenuController menuController = (MenuController) loader.getController();
|
menuController = (MenuController) loader.getController();
|
||||||
menuController.setApp(this);
|
menuController.setApp(this);
|
||||||
in.close();
|
in.close();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -180,6 +181,10 @@ public class App extends Application
|
|||||||
return (Initializable) loader.getController();
|
return (Initializable) loader.getController();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MenuController getMenuController() {
|
||||||
|
return menuController;
|
||||||
|
}
|
||||||
|
|
||||||
public Dataset getCurrentDataset(){
|
public Dataset getCurrentDataset(){
|
||||||
return currentDataset;
|
return currentDataset;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,26 +30,38 @@ public class Importer{
|
|||||||
if (scene == SceneCode.AIRLINE_RAW_DATA) {
|
if (scene == SceneCode.AIRLINE_RAW_DATA) {
|
||||||
try {
|
try {
|
||||||
showSuccessAlert(parent.getCurrentDataset().importAirline(file.getPath()));
|
showSuccessAlert(parent.getCurrentDataset().importAirline(file.getPath()));
|
||||||
|
parent.getMenuController().replaceSceneContent(SceneCode.AIRLINE_SUMMARY);
|
||||||
} catch (DataException e) {
|
} catch (DataException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
} else if (scene == SceneCode.AIRPORT_RAW_DATA) {
|
} else if (scene == SceneCode.AIRPORT_RAW_DATA) {
|
||||||
try {
|
try {
|
||||||
showSuccessAlert(parent.getCurrentDataset().importAirport(file.getPath()));
|
showSuccessAlert(parent.getCurrentDataset().importAirport(file.getPath()));
|
||||||
|
parent.getMenuController().replaceSceneContent(SceneCode.AIRPORT_SUMMARY);
|
||||||
} catch (DataException e) {
|
} catch (DataException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
} else if (scene == SceneCode.ROUTE_RAW_DATA) {
|
} else if (scene == SceneCode.ROUTE_RAW_DATA) {
|
||||||
try {
|
try {
|
||||||
showSuccessAlert(parent.getCurrentDataset().importRoute(file.getPath()));
|
showSuccessAlert(parent.getCurrentDataset().importRoute(file.getPath()));
|
||||||
|
parent.getMenuController().replaceSceneContent(SceneCode.ROUTE_SUMMARY);
|
||||||
} catch (DataException e) {
|
} catch (DataException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
} else if (scene == SceneCode.FLIGHT_RAW_DATA) {
|
} else if (scene == SceneCode.FLIGHT_RAW_DATA) {
|
||||||
try {
|
try {
|
||||||
showSuccessAlert(parent.getCurrentDataset().importFlight(file.getPath()));
|
showSuccessAlert(parent.getCurrentDataset().importFlight(file.getPath()));
|
||||||
|
parent.getMenuController().replaceSceneContent(SceneCode.FLIGHT_SUMMARY);
|
||||||
} catch (DataException e) {
|
} catch (DataException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user