Merge branch 'master' of https://eng-git.canterbury.ac.nz/fwy13/SENG202
commit
ddcb3f65a7
@ -0,0 +1,47 @@
|
||||
package seng202.group9.GUI;
|
||||
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.TableColumn;
|
||||
import javafx.scene.control.TableView;
|
||||
import javafx.scene.control.cell.PropertyValueFactory;
|
||||
import seng202.group9.Controller.App;
|
||||
import seng202.group9.Controller.Dataset;
|
||||
import seng202.group9.Core.Airline;
|
||||
|
||||
/**
|
||||
* Created by michael on 14/09/2016.
|
||||
*/
|
||||
public class AirlineSummaryController extends MenuController{
|
||||
@FXML
|
||||
private TableView<Airline> tableView;
|
||||
@FXML
|
||||
private TableColumn<Airline, String> columnName;
|
||||
@FXML
|
||||
private TableColumn<Airline, String> columnAlias;
|
||||
@FXML
|
||||
private TableColumn<Airline, String> columnCountry;
|
||||
@FXML
|
||||
private TableColumn<Airline, String> columnActive;
|
||||
@FXML
|
||||
private TableColumn<Airline, String> columnIATA;
|
||||
|
||||
private Dataset currentData = null;
|
||||
|
||||
App parent;
|
||||
|
||||
public void setApp(App parent){
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public void loadTables() {
|
||||
columnName.setCellValueFactory(new PropertyValueFactory<Airline, String>("Name"));
|
||||
columnAlias.setCellValueFactory(new PropertyValueFactory<Airline, String>("Alias"));
|
||||
columnCountry.setCellValueFactory(new PropertyValueFactory<Airline, String>("Country"));
|
||||
columnIATA.setCellValueFactory(new PropertyValueFactory<Airline, String>("IATA"));
|
||||
columnActive.setCellValueFactory(new PropertyValueFactory<Airline, String>("Active"));
|
||||
currentData = this.parent.getCurrentDataset();
|
||||
tableView.setItems(FXCollections.observableArrayList(currentData.getAirlines()));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
package seng202.group9.GUI;
|
||||
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.TableColumn;
|
||||
import javafx.scene.control.TableView;
|
||||
import javafx.scene.control.cell.PropertyValueFactory;
|
||||
import seng202.group9.Controller.App;
|
||||
import seng202.group9.Controller.Dataset;
|
||||
import seng202.group9.Core.Airport;
|
||||
|
||||
/**
|
||||
* Created by michael on 14/09/2016.
|
||||
*/
|
||||
public class AirportSummaryController extends MenuController{
|
||||
@FXML
|
||||
private TableView<Airport> tableView;
|
||||
@FXML
|
||||
private TableColumn<Airport, String> columnName;
|
||||
@FXML
|
||||
private TableColumn<Airport, String> columnCity;
|
||||
@FXML
|
||||
private TableColumn<Airport, String> columnCountry;
|
||||
@FXML
|
||||
private TableColumn<Airport, String> columnAltitude;
|
||||
@FXML
|
||||
private TableColumn<Airport, String> columnIATA;
|
||||
|
||||
private Dataset currentData = null;
|
||||
|
||||
App parent;
|
||||
|
||||
public void setApp(App parent){
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public void loadTables() {
|
||||
currentData = this.parent.getCurrentDataset();
|
||||
columnName.setCellValueFactory(new PropertyValueFactory<Airport, String>("Name"));
|
||||
columnCity.setCellValueFactory(new PropertyValueFactory<Airport, String>("City"));
|
||||
columnCountry.setCellValueFactory(new PropertyValueFactory<Airport, String>("Country"));
|
||||
columnIATA.setCellValueFactory(new PropertyValueFactory<Airport, String>("IATA_FFA"));
|
||||
columnAltitude.setCellValueFactory(new PropertyValueFactory<Airport, String>("Altitude"));
|
||||
currentData = this.parent.getCurrentDataset();
|
||||
tableView.setItems(FXCollections.observableArrayList(currentData.getAirports()));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
package seng202.group9.GUI;
|
||||
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.TableColumn;
|
||||
import javafx.scene.control.TableView;
|
||||
import javafx.scene.control.cell.PropertyValueFactory;
|
||||
import seng202.group9.Controller.App;
|
||||
import seng202.group9.Controller.Dataset;
|
||||
import seng202.group9.Core.Route;
|
||||
|
||||
/**
|
||||
* Created by michael on 14/09/2016.
|
||||
*/
|
||||
public class RouteSummaryController extends MenuController{
|
||||
@FXML
|
||||
private TableView<Route> tableView;
|
||||
@FXML
|
||||
private TableColumn<Route, String> columnAirline;
|
||||
@FXML
|
||||
private TableColumn<Route, String> columnDepart;
|
||||
@FXML
|
||||
private TableColumn<Route, String> columnArrive;
|
||||
@FXML
|
||||
private TableColumn<Route, String> columnStops;
|
||||
@FXML
|
||||
private TableColumn<Route, String> columnEquipment;
|
||||
|
||||
private Dataset currentData = null;
|
||||
|
||||
App parent;
|
||||
|
||||
public void setApp(App parent){
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public void loadTables() {
|
||||
currentData = this.parent.getCurrentDataset();
|
||||
columnAirline.setCellValueFactory(new PropertyValueFactory<Route, String>("Airline"));
|
||||
columnDepart.setCellValueFactory(new PropertyValueFactory<Route, String>("DepartureAirport"));
|
||||
columnArrive.setCellValueFactory(new PropertyValueFactory<Route, String>("ArrivalAirport"));
|
||||
columnStops.setCellValueFactory(new PropertyValueFactory<Route, String>("Stops"));
|
||||
columnEquipment.setCellValueFactory(new PropertyValueFactory<Route, String>("Equipment"));
|
||||
currentData = this.parent.getCurrentDataset();
|
||||
tableView.setItems(FXCollections.observableArrayList(currentData.getRoutes()));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,100 +1,94 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import java.lang.*?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.shape.*?>
|
||||
<?import javafx.scene.text.*?>
|
||||
<?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?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.ScrollPane?>
|
||||
<?import javafx.scene.control.TableColumn?>
|
||||
<?import javafx.scene.control.TableView?>
|
||||
<?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="800.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.FlightSummaryController">
|
||||
<children>
|
||||
<ScrollPane prefHeight="800.0" prefWidth="800.0">
|
||||
<content>
|
||||
<AnchorPane prefHeight="800.0" prefWidth="800.0">
|
||||
<children>
|
||||
<HBox alignment="CENTER" prefHeight="300.0" prefWidth="583.0" AnchorPane.topAnchor="25.0">
|
||||
<children>
|
||||
<AnchorPane prefHeight="300.0" prefWidth="330.0">
|
||||
<children>
|
||||
<Pane layoutY="-6.0" prefHeight="60.0" prefWidth="330.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<children>
|
||||
<Text layoutX="21.0" layoutY="40.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Airlines Summary">
|
||||
<font>
|
||||
<Font size="29.0" />
|
||||
</font>
|
||||
</Text>
|
||||
</children>
|
||||
</Pane>
|
||||
<Pane layoutY="52.0" prefHeight="240.0" prefWidth="480.0" AnchorPane.bottomAnchor="0.0">
|
||||
<children>
|
||||
<Pane layoutX="25.0" layoutY="10.0" prefHeight="220.0" prefWidth="120.0" />
|
||||
<TableView layoutX="10.0" layoutY="10.0" prefHeight="200.0" prefWidth="378.0">
|
||||
<columns>
|
||||
<TableColumn prefWidth="75.0" text="Name" />
|
||||
<TableColumn prefWidth="75.0" text="City" />
|
||||
<TableColumn prefWidth="75.0" text="Country" />
|
||||
<TableColumn prefWidth="75.0" text="Altitude" />
|
||||
<TableColumn prefWidth="75.0" text="IATA/FAA" />
|
||||
</columns>
|
||||
</TableView>
|
||||
</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="Flights">
|
||||
<font>
|
||||
<Font size="12.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button layoutX="20.0" layoutY="61.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="214.0" text="Airline 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">
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
</padding>
|
||||
</Pane>
|
||||
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="200.0" stroke="BLACK" strokeType="INSIDE" width="252.0" />
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</children>
|
||||
</HBox>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</content>
|
||||
</ScrollPane>
|
||||
</children>
|
||||
</VBox>
|
||||
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.45" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.AirlineSummaryController">
|
||||
<children>
|
||||
<ScrollPane prefHeight="800.0" prefWidth="800.0">
|
||||
<content>
|
||||
<AnchorPane prefHeight="800.0" prefWidth="800.0">
|
||||
<children>
|
||||
<HBox alignment="CENTER" prefHeight="300.0" prefWidth="583.0" AnchorPane.topAnchor="25.0">
|
||||
<children>
|
||||
<AnchorPane prefHeight="300.0" prefWidth="330.0">
|
||||
<children>
|
||||
<Pane layoutY="-6.0" prefHeight="60.0" prefWidth="330.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<children>
|
||||
<Text layoutX="21.0" layoutY="40.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Airlines Summary">
|
||||
<font>
|
||||
<Font size="29.0" />
|
||||
</font>
|
||||
</Text>
|
||||
</children>
|
||||
</Pane>
|
||||
<Pane layoutY="52.0" prefHeight="240.0" prefWidth="480.0" AnchorPane.bottomAnchor="0.0">
|
||||
<children>
|
||||
<Pane layoutX="25.0" layoutY="10.0" prefHeight="220.0" prefWidth="120.0" />
|
||||
<TableView fx:id="tableView" layoutX="10.0" layoutY="10.0" prefHeight="200.0" prefWidth="378.0">
|
||||
<columns>
|
||||
<TableColumn fx:id="columnName" text="Name" />
|
||||
<TableColumn fx:id="columnAlias" prefWidth="77.0" text="Alias" />
|
||||
<TableColumn fx:id="columnCountry" prefWidth="86.0" text="Country" />
|
||||
<TableColumn fx:id="columnIATA" prefWidth="86.0" text="IATA/FAA" />
|
||||
<TableColumn fx:id="columnActive" prefWidth="46.0" text="Active" />
|
||||
</columns>
|
||||
</TableView>
|
||||
</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="Flights">
|
||||
<font>
|
||||
<Font size="12.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<Button layoutX="20.0" layoutY="61.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="214.0" text="Airline 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">
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
</padding>
|
||||
</Pane>
|
||||
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="200.0" stroke="BLACK" strokeType="INSIDE" width="252.0" />
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</children>
|
||||
</HBox>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</content>
|
||||
</ScrollPane>
|
||||
</children>
|
||||
</VBox>
|
||||
Loading…
Reference in new issue