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();
|
primaryStage.sizeToScene();
|
||||||
MenuController menuController = (MenuController) loader.getController();
|
MenuController menuController = (MenuController) loader.getController();
|
||||||
menuController.setApp(this);
|
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) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
|
/*
|
||||||
//testing out dataset
|
//testing out dataset
|
||||||
try {
|
try {
|
||||||
currentDataset = new Dataset("test's", Dataset.getExisting);
|
currentDataset = new Dataset("test's", Dataset.getExisting);
|
||||||
@@ -78,6 +79,7 @@ public class App extends Application
|
|||||||
} catch (DataException e) {
|
} catch (DataException e) {
|
||||||
e.printStackTrace();
|
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 javax.swing.JOptionPane;
|
||||||
|
|
||||||
import javafx.fxml.FXML;
|
|
||||||
import javafx.fxml.Initializable;
|
import javafx.fxml.Initializable;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.layout.BorderPane;
|
import javafx.scene.layout.BorderPane;
|
||||||
@@ -36,7 +35,7 @@ public class MenuController implements Initializable{
|
|||||||
/**
|
/**
|
||||||
* Load Airline Raw Data Function.
|
* Load Airline Raw Data Function.
|
||||||
*/
|
*/
|
||||||
public void loadAirlineRaw() {
|
public void viewAirlineRawData() {
|
||||||
try {
|
try {
|
||||||
parent.replaceSceneContent("menu.fxml");
|
parent.replaceSceneContent("menu.fxml");
|
||||||
System.out.println("Loaded Airline Raw Data.");
|
System.out.println("Loaded Airline Raw Data.");
|
||||||
@@ -49,31 +48,30 @@ public class MenuController implements Initializable{
|
|||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load Flight Summary Function.
|
||||||
|
*/
|
||||||
public void viewFlightSummary() {
|
public void viewFlightSummary() {
|
||||||
Stage stage = new Stage();
|
try {
|
||||||
BorderPane root = new BorderPane(); //root panel
|
FlightSummaryController summaryController = (FlightSummaryController)
|
||||||
Scene scene = new Scene(root);
|
parent.replaceSceneContent("flight_data_summary.fxml");
|
||||||
//create the Flight summary page
|
summaryController.setApp(parent);
|
||||||
FlightDataSummary flightSummPage = new FlightDataSummary();
|
} catch (Exception e) {
|
||||||
root.setTop(flightSummPage.getFlightSummary());
|
e.printStackTrace();
|
||||||
stage.setScene(scene);
|
}
|
||||||
stage.show();
|
|
||||||
//seng202.group9.Controller.App.primaryStage.setScene(scene);
|
|
||||||
//seng202.group9.Controller.App.primaryStage.show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load Flight Raw Data Function.
|
||||||
|
*/
|
||||||
public void viewFlightRawData() {
|
public void viewFlightRawData() {
|
||||||
|
try {
|
||||||
Stage stage = new Stage();
|
FlightRawDataController rawDataController = (FlightRawDataController)
|
||||||
BorderPane root = new BorderPane(); //root panel
|
parent.replaceSceneContent("flight_raw_data.fxml");
|
||||||
Scene scene = new Scene(root);
|
rawDataController.setApp(parent);
|
||||||
//create the Flight summary page
|
} catch (Exception e) {
|
||||||
FlightRawData flightRawDataPage = new FlightRawData();
|
e.printStackTrace();
|
||||||
root.setTop(flightRawDataPage.getFlightRawData());
|
}
|
||||||
stage.setScene(scene);
|
|
||||||
stage.show();
|
|
||||||
//seng202.group9.Controller.App.primaryStage.setScene(scene);
|
|
||||||
//seng202.group9.Controller.App.primaryStage.show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,111 +1,96 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<?import javafx.scene.text.*?>
|
<?import javafx.geometry.Insets?>
|
||||||
<?import javafx.scene.paint.*?>
|
<?import javafx.scene.control.Button?>
|
||||||
<?import javafx.geometry.*?>
|
<?import javafx.scene.control.ListView?>
|
||||||
<?import javafx.scene.effect.*?>
|
<?import javafx.scene.control.ScrollPane?>
|
||||||
<?import javafx.scene.shape.*?>
|
<?import javafx.scene.control.TextArea?>
|
||||||
<?import java.lang.*?>
|
<?import javafx.scene.layout.AnchorPane?>
|
||||||
<?import javafx.scene.control.*?>
|
<?import javafx.scene.layout.HBox?>
|
||||||
<?import javafx.scene.layout.*?>
|
<?import javafx.scene.layout.Pane?>
|
||||||
|
<?import javafx.scene.layout.VBox?>
|
||||||
|
<?import javafx.scene.shape.Rectangle?>
|
||||||
|
<?import javafx.scene.text.Font?>
|
||||||
|
<?import javafx.scene.text.Text?>
|
||||||
|
|
||||||
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.MenuController">
|
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.MenuController">
|
||||||
<children>
|
<children>
|
||||||
<MenuBar>
|
<ScrollPane prefHeight="800.0" prefWidth="800.0">
|
||||||
<menus>
|
<content>
|
||||||
<Menu mnemonicParsing="false" text="File">
|
<AnchorPane prefHeight="800.0" prefWidth="800.0">
|
||||||
<items>
|
|
||||||
<MenuItem mnemonicParsing="false" onAction="#importAirports" text="Import Airports" />
|
|
||||||
<MenuItem mnemonicParsing="false" onAction="#importAirlines" text="Import Airlines" />
|
|
||||||
<MenuItem mnemonicParsing="false" onAction="#importRoutes" text="Import Routes" />
|
|
||||||
<MenuItem mnemonicParsing="false" onAction="#importFlightData" text="Import Flight Data" />
|
|
||||||
<SeparatorMenuItem mnemonicParsing="false" />
|
|
||||||
<MenuItem mnemonicParsing="false" text="Close" />
|
|
||||||
</items>
|
|
||||||
</Menu>
|
|
||||||
<Menu mnemonicParsing="false" text="View" />
|
|
||||||
<Menu mnemonicParsing="false" text="Analysis" />
|
|
||||||
<Menu mnemonicParsing="false" text="Help">
|
|
||||||
<items>
|
|
||||||
<MenuItem mnemonicParsing="false" text="Getting Started" />
|
|
||||||
</items>
|
|
||||||
</Menu>
|
|
||||||
</menus>
|
|
||||||
</MenuBar>
|
|
||||||
<AnchorPane prefHeight="371.0" prefWidth="600.0">
|
|
||||||
<children>
|
|
||||||
<HBox prefHeight="300.0" prefWidth="583.0">
|
|
||||||
<children>
|
<children>
|
||||||
<AnchorPane prefHeight="300.0" prefWidth="330.0">
|
<HBox alignment="CENTER" prefHeight="300.0" prefWidth="583.0" AnchorPane.topAnchor="25.0">
|
||||||
<children>
|
<children>
|
||||||
<Pane layoutY="-6.0" prefHeight="60.0" prefWidth="330.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
<AnchorPane prefHeight="300.0" prefWidth="330.0">
|
||||||
<children>
|
<children>
|
||||||
<Text layoutX="21.0" layoutY="40.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Flight Data Summary">
|
<Pane layoutY="-6.0" prefHeight="60.0" prefWidth="330.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
<font>
|
|
||||||
<Font size="29.0" />
|
|
||||||
</font>
|
|
||||||
</Text>
|
|
||||||
</children>
|
|
||||||
</Pane>
|
|
||||||
<Pane layoutY="52.0" prefHeight="240.0" prefWidth="330.0" AnchorPane.bottomAnchor="0.0">
|
|
||||||
<children>
|
|
||||||
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="#0d93e0" height="220.0" layoutX="170.0" layoutY="10.0" smooth="false" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="160.0" />
|
|
||||||
<Pane layoutX="25.0" layoutY="10.0" prefHeight="220.0" prefWidth="120.0">
|
|
||||||
<children>
|
<children>
|
||||||
<ScrollBar layoutX="103.0" orientation="VERTICAL" prefHeight="220.0" prefWidth="17.0" />
|
<Text layoutX="21.0" layoutY="40.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Flight Data Summary">
|
||||||
<ListView layoutX="3.0" prefHeight="220.0" prefWidth="100.0" />
|
<font>
|
||||||
|
<Font size="29.0" />
|
||||||
|
</font>
|
||||||
|
</Text>
|
||||||
</children>
|
</children>
|
||||||
</Pane>
|
</Pane>
|
||||||
</children>
|
<Pane layoutY="52.0" prefHeight="240.0" prefWidth="480.0" AnchorPane.bottomAnchor="0.0">
|
||||||
<padding>
|
<children>
|
||||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="#0d93e0" height="220.0" layoutX="170.0" layoutY="10.0" smooth="false" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="160.0" />
|
||||||
</padding>
|
<Pane layoutX="25.0" layoutY="10.0" prefHeight="220.0" prefWidth="120.0">
|
||||||
</Pane>
|
<children>
|
||||||
</children>
|
<ListView prefHeight="220.0" prefWidth="120.0" />
|
||||||
</AnchorPane>
|
</children>
|
||||||
<AnchorPane prefHeight="300.0" prefWidth="253.0">
|
</Pane>
|
||||||
<children>
|
</children>
|
||||||
<Pane layoutY="200.0" prefHeight="100.0" prefWidth="253.0">
|
|
||||||
<children>
|
|
||||||
<Button layoutX="20.0" layoutY="14.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Airports">
|
|
||||||
<font>
|
|
||||||
<Font size="12.0" />
|
|
||||||
</font>
|
|
||||||
</Button>
|
|
||||||
<Button layoutX="94.0" layoutY="14.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Routes">
|
|
||||||
<font>
|
|
||||||
<Font size="12.0" />
|
|
||||||
</font>
|
|
||||||
</Button>
|
|
||||||
<Button layoutX="169.0" layoutY="14.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Airlines">
|
|
||||||
<font>
|
|
||||||
<Font size="12.0" />
|
|
||||||
</font>
|
|
||||||
</Button>
|
|
||||||
<Button layoutX="20.0" layoutY="61.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="214.0" text="Flight Raw Data" />
|
|
||||||
</children>
|
|
||||||
<padding>
|
|
||||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
|
||||||
</padding>
|
|
||||||
</Pane>
|
|
||||||
<Pane prefHeight="200.0" prefWidth="253.0">
|
|
||||||
<children>
|
|
||||||
<TextArea layoutX="20.0" layoutY="26.0" prefHeight="160.0" prefWidth="213.0">
|
|
||||||
<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>
|
||||||
</TextArea>
|
</Pane>
|
||||||
</children>
|
</children>
|
||||||
<padding>
|
</AnchorPane>
|
||||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
<AnchorPane prefHeight="300.0" prefWidth="253.0">
|
||||||
</padding>
|
<children>
|
||||||
</Pane>
|
<Pane layoutY="200.0" prefHeight="100.0" prefWidth="253.0">
|
||||||
|
<children>
|
||||||
|
<Button layoutX="20.0" layoutY="14.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Airports">
|
||||||
|
<font>
|
||||||
|
<Font size="12.0" />
|
||||||
|
</font>
|
||||||
|
</Button>
|
||||||
|
<Button layoutX="94.0" layoutY="14.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Routes">
|
||||||
|
<font>
|
||||||
|
<Font size="12.0" />
|
||||||
|
</font>
|
||||||
|
</Button>
|
||||||
|
<Button layoutX="169.0" layoutY="14.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="65.0" text="Airlines">
|
||||||
|
<font>
|
||||||
|
<Font size="12.0" />
|
||||||
|
</font>
|
||||||
|
</Button>
|
||||||
|
<Button layoutX="20.0" layoutY="61.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="214.0" text="Flight Raw Data" />
|
||||||
|
</children>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||||
|
</padding>
|
||||||
|
</Pane>
|
||||||
|
<Pane prefHeight="200.0" prefWidth="253.0">
|
||||||
|
<children>
|
||||||
|
<TextArea layoutX="20.0" layoutY="20.0" prefHeight="160.0" prefWidth="213.0">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||||
|
</padding>
|
||||||
|
</TextArea>
|
||||||
|
</children>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||||
|
</padding>
|
||||||
|
</Pane>
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</HBox>
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</AnchorPane>
|
||||||
<ScrollBar layoutX="583.0" orientation="VERTICAL" prefHeight="371.0" prefWidth="17.0" />
|
</content>
|
||||||
</children>
|
</ScrollPane>
|
||||||
</AnchorPane>
|
|
||||||
</children>
|
</children>
|
||||||
</VBox>
|
</VBox>
|
||||||
|
|||||||
@@ -1,15 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<?import java.lang.*?>
|
|
||||||
<?import javafx.scene.control.*?>
|
|
||||||
<?import javafx.scene.layout.*?>
|
|
||||||
<?import javafx.scene.control.Menu?>
|
<?import javafx.scene.control.Menu?>
|
||||||
<?import javafx.scene.control.MenuBar?>
|
<?import javafx.scene.control.MenuBar?>
|
||||||
<?import javafx.scene.control.MenuItem?>
|
<?import javafx.scene.control.MenuItem?>
|
||||||
<?import javafx.scene.control.SeparatorMenuItem?>
|
<?import javafx.scene.control.SeparatorMenuItem?>
|
||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
|
|
||||||
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.MenuController">
|
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.MenuController">
|
||||||
<children>
|
<children>
|
||||||
<MenuBar>
|
<MenuBar>
|
||||||
<menus>
|
<menus>
|
||||||
@@ -34,7 +31,7 @@
|
|||||||
<Menu mnemonicParsing="false" text="Airline">
|
<Menu mnemonicParsing="false" text="Airline">
|
||||||
<items>
|
<items>
|
||||||
<MenuItem mnemonicParsing="false" text="Summary" />
|
<MenuItem mnemonicParsing="false" text="Summary" />
|
||||||
<MenuItem mnemonicParsing="false" onAction="#loadAirlineRaw" text="Raw Data" />
|
<MenuItem mnemonicParsing="false" onAction="#viewAirlineRawData" text="Raw Data" />
|
||||||
</items>
|
</items>
|
||||||
</Menu>
|
</Menu>
|
||||||
<Menu mnemonicParsing="false" text="Route">
|
<Menu mnemonicParsing="false" text="Route">
|
||||||
@@ -45,8 +42,8 @@
|
|||||||
</Menu>
|
</Menu>
|
||||||
<Menu mnemonicParsing="false" text="Flight">
|
<Menu mnemonicParsing="false" text="Flight">
|
||||||
<items>
|
<items>
|
||||||
<MenuItem mnemonicParsing="false" text="Summary" />
|
<MenuItem mnemonicParsing="false" onAction="#viewFlightSummary" text="Summary" />
|
||||||
<MenuItem mnemonicParsing="false" text="Raw Data" />
|
<MenuItem mnemonicParsing="false" onAction="#viewFlightRawData" text="Raw Data" />
|
||||||
</items>
|
</items>
|
||||||
</Menu>
|
</Menu>
|
||||||
<Menu mnemonicParsing="false" text="Maps">
|
<Menu mnemonicParsing="false" text="Maps">
|
||||||
|
|||||||
Reference in New Issue
Block a user