Minor bug fixes.
This commit is contained in:
@@ -36,7 +36,7 @@ public class BarGraphController extends Controller {
|
|||||||
public void build_graph(){
|
public void build_graph(){
|
||||||
//Takes routes from the full dataset.
|
//Takes routes from the full dataset.
|
||||||
current_routes = currentdata.getRoutes();
|
current_routes = currentdata.getRoutes();
|
||||||
datasetup(current_routes);
|
//datasetup(current_routes);
|
||||||
//Builds series needed for the graph.
|
//Builds series needed for the graph.
|
||||||
XYChart.Series seriesArivals = new XYChart.Series();
|
XYChart.Series seriesArivals = new XYChart.Series();
|
||||||
XYChart.Series seriesDeparts = new XYChart.Series();
|
XYChart.Series seriesDeparts = new XYChart.Series();
|
||||||
@@ -83,11 +83,11 @@ public class BarGraphController extends Controller {
|
|||||||
name = entry.getCountryName();
|
name = entry.getCountryName();
|
||||||
}
|
}
|
||||||
if (useddata.containsKey(name)){
|
if (useddata.containsKey(name)){
|
||||||
int temp = useddata.get(name);
|
//int temp = useddata.get(name);
|
||||||
useddata.replace(name,temp+1);
|
//useddata.replace(name,temp+1);
|
||||||
}else {
|
}else {
|
||||||
Integer temp = 1;
|
Integer temp = 1;
|
||||||
useddata.put(name,temp);
|
//useddata.put(name,temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -95,12 +95,12 @@ public class BarGraphController extends Controller {
|
|||||||
|
|
||||||
private void datasetupCustomRoute(ArrayList<Route> current_routes){
|
private void datasetupCustomRoute(ArrayList<Route> current_routes){
|
||||||
//Takes out the specified field (Currently departure airport and arrival airport) then adds to the used data dict.
|
//Takes out the specified field (Currently departure airport and arrival airport) then adds to the used data dict.
|
||||||
if(currentsession.getSelectedgraphagainst() = ""){
|
//if(currentsession.getSelectedgraphagainst() = ""){
|
||||||
|
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
for (Route entry : current_routes){
|
for (Route entry : current_routes){
|
||||||
String departs = entry.getDepartureAirport();
|
String departs = entry.getDepartureAirport();
|
||||||
String arives = entry.getArrivalAirport();
|
String arives = entry.getArrivalAirport();
|
||||||
@@ -125,7 +125,7 @@ public class BarGraphController extends Controller {
|
|||||||
useddata.put(arives,temp);
|
useddata.put(arives,temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* Takes the current dataset then loads the data to the graph using build graph.
|
* Takes the current dataset then loads the data to the graph using build graph.
|
||||||
*/
|
*/
|
||||||
@@ -161,7 +161,7 @@ public class BarGraphController extends Controller {
|
|||||||
else{
|
else{
|
||||||
d = currentdata.getAirlines();
|
d = currentdata.getAirlines();
|
||||||
}
|
}
|
||||||
datasetupCustomarAirline(d);
|
//datasetupCustomarAirline(d);
|
||||||
}
|
}
|
||||||
else if (temp == "Routes") {
|
else if (temp == "Routes") {
|
||||||
ArrayList<Route> d = new ArrayList();
|
ArrayList<Route> d = new ArrayList();
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class PieChartErrorController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void ignoredWarning() {
|
public void ignoredWarning() {
|
||||||
currentSession.setForceGraph(Boolean.TRUE);
|
currentSession.setForceGraph(true);
|
||||||
replaceSceneContent(SceneCode.AIRPORT_ANALYSER);
|
replaceSceneContent(SceneCode.AIRPORT_ANALYSER);
|
||||||
}
|
}
|
||||||
public void backToSafety(){
|
public void backToSafety(){
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public class PieChooserController extends Controller{
|
|||||||
currentsession.setSelectedDataToGraph(datatypechooser.getSelectionModel().getSelectedItem().toString());
|
currentsession.setSelectedDataToGraph(datatypechooser.getSelectionModel().getSelectedItem().toString());
|
||||||
currentsession.setSelectedgraphagainst(graph_options.getSelectionModel().getSelectedItem().toString());
|
currentsession.setSelectedgraphagainst(graph_options.getSelectionModel().getSelectedItem().toString());
|
||||||
currentsession.setUsefilter(usefilter.isSelected());
|
currentsession.setUsefilter(usefilter.isSelected());
|
||||||
currentsession.setForceGraph(Boolean.FALSE);
|
currentsession.setForceGraph(false);
|
||||||
replaceSceneContent(SceneCode.AIRPORT_ANALYSER);
|
replaceSceneContent(SceneCode.AIRPORT_ANALYSER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,6 +64,7 @@ public class PieChooserController extends Controller{
|
|||||||
changeTables();
|
changeTables();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
graph_options.setItems(airportOptions);
|
graph_options.setItems(airportOptions);
|
||||||
graph_options.getSelectionModel().selectFirst();
|
graph_options.getSelectionModel().selectFirst();
|
||||||
allOptions.add(airportOptions);
|
allOptions.add(airportOptions);
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public class PieGraphController extends Controller {
|
|||||||
pieChartData.add(new PieChart.Data(airport,temp));
|
pieChartData.add(new PieChart.Data(airport,temp));
|
||||||
}
|
}
|
||||||
//Gives the data to the graph.
|
//Gives the data to the graph.
|
||||||
if (useddata.keySet().size() > 50 && currentsession.getForceGraph()){
|
if (useddata.keySet().size() > 250 && currentsession.getForceGraph()){
|
||||||
replaceSceneContent(SceneCode.CHART_ERROR);
|
replaceSceneContent(SceneCode.CHART_ERROR);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@@ -66,7 +66,7 @@ public class PieGraphController extends Controller {
|
|||||||
else if (currentsession.getSelectedgraphagainst() == "ICAO") {
|
else if (currentsession.getSelectedgraphagainst() == "ICAO") {
|
||||||
name = entry.getICAO();
|
name = entry.getICAO();
|
||||||
}
|
}
|
||||||
else if (currentsession.getSelectedgraphagainst() == "IATA_FFA") {
|
else if (currentsession.getSelectedgraphagainst() == "IATA FFA") {
|
||||||
name = entry.getIATA_FFA();
|
name = entry.getIATA_FFA();
|
||||||
}
|
}
|
||||||
else if (currentsession.getSelectedgraphagainst() == "City") {
|
else if (currentsession.getSelectedgraphagainst() == "City") {
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import java.lang.*?>
|
||||||
|
<?import javafx.geometry.*?>
|
||||||
|
<?import javafx.scene.control.*?>
|
||||||
|
<?import javafx.scene.layout.*?>
|
||||||
|
<?import javafx.scene.text.*?>
|
||||||
<?import javafx.geometry.Insets?>
|
<?import javafx.geometry.Insets?>
|
||||||
<?import javafx.scene.control.Button?>
|
<?import javafx.scene.control.Button?>
|
||||||
<?import javafx.scene.control.CheckBox?>
|
<?import javafx.scene.control.CheckBox?>
|
||||||
@@ -14,10 +19,8 @@
|
|||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
<?import javafx.scene.text.Text?>
|
<?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.0.45" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.PieChooserController">
|
<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.PieChooserController">
|
||||||
<children>
|
<children>
|
||||||
<ScrollPane prefHeight="800.0" prefWidth="800.0">
|
|
||||||
<content>
|
|
||||||
<AnchorPane prefHeight="800.0" prefWidth="800.0">
|
<AnchorPane prefHeight="800.0" prefWidth="800.0">
|
||||||
<children>
|
<children>
|
||||||
<HBox alignment="CENTER" prefHeight="300.0" prefWidth="583.0" AnchorPane.topAnchor="25.0">
|
<HBox alignment="CENTER" prefHeight="300.0" prefWidth="583.0" AnchorPane.topAnchor="25.0">
|
||||||
@@ -37,14 +40,6 @@
|
|||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
<AnchorPane prefHeight="300.0" prefWidth="253.0">
|
<AnchorPane prefHeight="300.0" prefWidth="253.0">
|
||||||
<children>
|
<children>
|
||||||
<Pane layoutY="200.0" prefHeight="100.0" prefWidth="253.0">
|
|
||||||
<padding>
|
|
||||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
|
||||||
</padding>
|
|
||||||
<children>
|
|
||||||
<ListView fx:id="graph_options" layoutX="-35.0" layoutY="-50.0" prefHeight="200.0" prefWidth="200.0" />
|
|
||||||
</children>
|
|
||||||
</Pane>
|
|
||||||
<Pane prefHeight="200.0" prefWidth="253.0">
|
<Pane prefHeight="200.0" prefWidth="253.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" />
|
||||||
@@ -55,6 +50,7 @@
|
|||||||
<Label layoutX="15.0" layoutY="-7.0" text="Data Type Used" />
|
<Label layoutX="15.0" layoutY="-7.0" text="Data Type Used" />
|
||||||
</children>
|
</children>
|
||||||
</Pane>
|
</Pane>
|
||||||
|
<ListView fx:id="graph_options" layoutY="155.0" prefHeight="200.0" prefWidth="200.0" />
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
</children>
|
</children>
|
||||||
@@ -65,7 +61,5 @@
|
|||||||
<CheckBox fx:id="usefilter" layoutX="356.0" layoutY="464.0" mnemonicParsing="false" text="Use filters from Raw Data" />
|
<CheckBox fx:id="usefilter" layoutX="356.0" layoutY="464.0" mnemonicParsing="false" text="Use filters from Raw Data" />
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
</content>
|
|
||||||
</ScrollPane>
|
|
||||||
</children>
|
</children>
|
||||||
</VBox>
|
</VBox>
|
||||||
|
|||||||
Reference in New Issue
Block a user