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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,111 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.text.*?>
|
||||
<?import javafx.scene.paint.*?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.effect.*?>
|
||||
<?import javafx.scene.shape.*?>
|
||||
<?import java.lang.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.ListView?>
|
||||
<?import javafx.scene.control.ScrollPane?>
|
||||
<?import javafx.scene.control.TextArea?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?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>
|
||||
<MenuBar>
|
||||
<menus>
|
||||
<Menu mnemonicParsing="false" text="File">
|
||||
<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">
|
||||
<ScrollPane prefHeight="800.0" prefWidth="800.0">
|
||||
<content>
|
||||
<AnchorPane prefHeight="800.0" prefWidth="800.0">
|
||||
<children>
|
||||
<AnchorPane prefHeight="300.0" prefWidth="330.0">
|
||||
<HBox alignment="CENTER" prefHeight="300.0" prefWidth="583.0" AnchorPane.topAnchor="25.0">
|
||||
<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>
|
||||
<Text layoutX="21.0" layoutY="40.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Flight Data Summary">
|
||||
<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">
|
||||
<Pane layoutY="-6.0" prefHeight="60.0" prefWidth="330.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<children>
|
||||
<ScrollBar layoutX="103.0" orientation="VERTICAL" prefHeight="220.0" prefWidth="17.0" />
|
||||
<ListView layoutX="3.0" prefHeight="220.0" prefWidth="100.0" />
|
||||
<Text layoutX="21.0" layoutY="40.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Flight Data Summary">
|
||||
<font>
|
||||
<Font size="29.0" />
|
||||
</font>
|
||||
</Text>
|
||||
</children>
|
||||
</Pane>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
</padding>
|
||||
</Pane>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<AnchorPane prefHeight="300.0" prefWidth="253.0">
|
||||
<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">
|
||||
<Pane layoutY="52.0" prefHeight="240.0" prefWidth="480.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>
|
||||
<ListView prefHeight="220.0" prefWidth="120.0" />
|
||||
</children>
|
||||
</Pane>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
</padding>
|
||||
</TextArea>
|
||||
</Pane>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
</padding>
|
||||
</Pane>
|
||||
</AnchorPane>
|
||||
<AnchorPane prefHeight="300.0" prefWidth="253.0">
|
||||
<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="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>
|
||||
</AnchorPane>
|
||||
</HBox>
|
||||
</children>
|
||||
</HBox>
|
||||
<ScrollBar layoutX="583.0" orientation="VERTICAL" prefHeight="371.0" prefWidth="17.0" />
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</AnchorPane>
|
||||
</content>
|
||||
</ScrollPane>
|
||||
</children>
|
||||
</VBox>
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
<?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.MenuBar?>
|
||||
<?import javafx.scene.control.MenuItem?>
|
||||
<?import javafx.scene.control.SeparatorMenuItem?>
|
||||
<?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>
|
||||
<MenuBar>
|
||||
<menus>
|
||||
@@ -34,7 +31,7 @@
|
||||
<Menu mnemonicParsing="false" text="Airline">
|
||||
<items>
|
||||
<MenuItem mnemonicParsing="false" text="Summary" />
|
||||
<MenuItem mnemonicParsing="false" onAction="#loadAirlineRaw" text="Raw Data" />
|
||||
<MenuItem mnemonicParsing="false" onAction="#viewAirlineRawData" text="Raw Data" />
|
||||
</items>
|
||||
</Menu>
|
||||
<Menu mnemonicParsing="false" text="Route">
|
||||
@@ -45,8 +42,8 @@
|
||||
</Menu>
|
||||
<Menu mnemonicParsing="false" text="Flight">
|
||||
<items>
|
||||
<MenuItem mnemonicParsing="false" text="Summary" />
|
||||
<MenuItem mnemonicParsing="false" text="Raw Data" />
|
||||
<MenuItem mnemonicParsing="false" onAction="#viewFlightSummary" text="Summary" />
|
||||
<MenuItem mnemonicParsing="false" onAction="#viewFlightRawData" text="Raw Data" />
|
||||
</items>
|
||||
</Menu>
|
||||
<Menu mnemonicParsing="false" text="Maps">
|
||||
|
||||
Reference in New Issue
Block a user