Minor bug fixes.
This commit is contained in:
@@ -36,7 +36,7 @@ public class BarGraphController extends Controller {
|
||||
public void build_graph(){
|
||||
//Takes routes from the full dataset.
|
||||
current_routes = currentdata.getRoutes();
|
||||
datasetup(current_routes);
|
||||
//datasetup(current_routes);
|
||||
//Builds series needed for the graph.
|
||||
XYChart.Series seriesArivals = new XYChart.Series();
|
||||
XYChart.Series seriesDeparts = new XYChart.Series();
|
||||
@@ -83,11 +83,11 @@ public class BarGraphController extends Controller {
|
||||
name = entry.getCountryName();
|
||||
}
|
||||
if (useddata.containsKey(name)){
|
||||
int temp = useddata.get(name);
|
||||
useddata.replace(name,temp+1);
|
||||
//int temp = useddata.get(name);
|
||||
//useddata.replace(name,temp+1);
|
||||
}else {
|
||||
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){
|
||||
//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){
|
||||
String departs = entry.getDepartureAirport();
|
||||
String arives = entry.getArrivalAirport();
|
||||
@@ -125,7 +125,7 @@ public class BarGraphController extends Controller {
|
||||
useddata.put(arives,temp);
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
/**
|
||||
* Takes the current dataset then loads the data to the graph using build graph.
|
||||
*/
|
||||
@@ -161,7 +161,7 @@ public class BarGraphController extends Controller {
|
||||
else{
|
||||
d = currentdata.getAirlines();
|
||||
}
|
||||
datasetupCustomarAirline(d);
|
||||
//datasetupCustomarAirline(d);
|
||||
}
|
||||
else if (temp == "Routes") {
|
||||
ArrayList<Route> d = new ArrayList();
|
||||
|
||||
@@ -14,7 +14,7 @@ public class PieChartErrorController extends Controller {
|
||||
}
|
||||
|
||||
public void ignoredWarning() {
|
||||
currentSession.setForceGraph(Boolean.TRUE);
|
||||
currentSession.setForceGraph(true);
|
||||
replaceSceneContent(SceneCode.AIRPORT_ANALYSER);
|
||||
}
|
||||
public void backToSafety(){
|
||||
|
||||
@@ -47,7 +47,7 @@ public class PieChooserController extends Controller{
|
||||
currentsession.setSelectedDataToGraph(datatypechooser.getSelectionModel().getSelectedItem().toString());
|
||||
currentsession.setSelectedgraphagainst(graph_options.getSelectionModel().getSelectedItem().toString());
|
||||
currentsession.setUsefilter(usefilter.isSelected());
|
||||
currentsession.setForceGraph(Boolean.FALSE);
|
||||
currentsession.setForceGraph(false);
|
||||
replaceSceneContent(SceneCode.AIRPORT_ANALYSER);
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ public class PieChooserController extends Controller{
|
||||
changeTables();
|
||||
}
|
||||
});
|
||||
|
||||
graph_options.setItems(airportOptions);
|
||||
graph_options.getSelectionModel().selectFirst();
|
||||
allOptions.add(airportOptions);
|
||||
|
||||
@@ -44,7 +44,7 @@ public class PieGraphController extends Controller {
|
||||
pieChartData.add(new PieChart.Data(airport,temp));
|
||||
}
|
||||
//Gives the data to the graph.
|
||||
if (useddata.keySet().size() > 50 && currentsession.getForceGraph()){
|
||||
if (useddata.keySet().size() > 250 && currentsession.getForceGraph()){
|
||||
replaceSceneContent(SceneCode.CHART_ERROR);
|
||||
}
|
||||
else{
|
||||
@@ -66,7 +66,7 @@ public class PieGraphController extends Controller {
|
||||
else if (currentsession.getSelectedgraphagainst() == "ICAO") {
|
||||
name = entry.getICAO();
|
||||
}
|
||||
else if (currentsession.getSelectedgraphagainst() == "IATA_FFA") {
|
||||
else if (currentsession.getSelectedgraphagainst() == "IATA FFA") {
|
||||
name = entry.getIATA_FFA();
|
||||
}
|
||||
else if (currentsession.getSelectedgraphagainst() == "City") {
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<?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.scene.control.Button?>
|
||||
<?import javafx.scene.control.CheckBox?>
|
||||
@@ -14,58 +19,47 @@
|
||||
<?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.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>
|
||||
<ScrollPane prefHeight="800.0" prefWidth="800.0">
|
||||
<content>
|
||||
<AnchorPane prefHeight="800.0" prefWidth="800.0">
|
||||
<AnchorPane prefHeight="800.0" prefWidth="800.0">
|
||||
<children>
|
||||
<HBox alignment="CENTER" prefHeight="300.0" prefWidth="583.0" AnchorPane.topAnchor="25.0">
|
||||
<children>
|
||||
<HBox alignment="CENTER" prefHeight="300.0" prefWidth="583.0" AnchorPane.topAnchor="25.0">
|
||||
<AnchorPane prefHeight="300.0" prefWidth="330.0">
|
||||
<children>
|
||||
<AnchorPane prefHeight="300.0" prefWidth="330.0">
|
||||
<Pane layoutY="-6.0" prefHeight="60.0" prefWidth="330.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.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="Pie Graph">
|
||||
<font>
|
||||
<Font size="29.0" />
|
||||
</font>
|
||||
</Text>
|
||||
</children>
|
||||
</Pane>
|
||||
<Text layoutX="21.0" layoutY="40.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Pie Graph">
|
||||
<font>
|
||||
<Font size="29.0" />
|
||||
</font>
|
||||
</Text>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<AnchorPane prefHeight="300.0" prefWidth="253.0">
|
||||
<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">
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
</padding>
|
||||
<children>
|
||||
<ChoiceBox fx:id="datatypechooser" layoutY="14.0" prefWidth="150.0" />
|
||||
<Label layoutX="-6.0" layoutY="120.0" text="Values to be Graphed." />
|
||||
<Label layoutX="15.0" layoutY="-7.0" text="Data Type Used" />
|
||||
</children>
|
||||
</Pane>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</Pane>
|
||||
</children>
|
||||
</HBox>
|
||||
<Button layoutX="234.0" layoutY="413.0" mnemonicParsing="false" onAction="#buildGraph" text="Build Graph" />
|
||||
<Button layoutX="346.0" layoutY="413.0" mnemonicParsing="false" onAction="#newFilter" text="New Filter" />
|
||||
<Button layoutX="462.0" layoutY="413.0" mnemonicParsing="false" onAction="#toBarGraphChooser" text="Change Graph Type" />
|
||||
<CheckBox fx:id="usefilter" layoutX="356.0" layoutY="464.0" mnemonicParsing="false" text="Use filters from Raw Data" />
|
||||
</AnchorPane>
|
||||
<AnchorPane prefHeight="300.0" prefWidth="253.0">
|
||||
<children>
|
||||
<Pane prefHeight="200.0" prefWidth="253.0">
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
</padding>
|
||||
<children>
|
||||
<ChoiceBox fx:id="datatypechooser" layoutY="14.0" prefWidth="150.0" />
|
||||
<Label layoutX="-6.0" layoutY="120.0" text="Values to be Graphed." />
|
||||
<Label layoutX="15.0" layoutY="-7.0" text="Data Type Used" />
|
||||
</children>
|
||||
</Pane>
|
||||
<ListView fx:id="graph_options" layoutY="155.0" prefHeight="200.0" prefWidth="200.0" />
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</content>
|
||||
</ScrollPane>
|
||||
</HBox>
|
||||
<Button layoutX="234.0" layoutY="413.0" mnemonicParsing="false" onAction="#buildGraph" text="Build Graph" />
|
||||
<Button layoutX="346.0" layoutY="413.0" mnemonicParsing="false" onAction="#newFilter" text="New Filter" />
|
||||
<Button layoutX="462.0" layoutY="413.0" mnemonicParsing="false" onAction="#toBarGraphChooser" text="Change Graph Type" />
|
||||
<CheckBox fx:id="usefilter" layoutX="356.0" layoutY="464.0" mnemonicParsing="false" text="Use filters from Raw Data" />
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</children>
|
||||
</VBox>
|
||||
|
||||
Reference in New Issue
Block a user