diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
new file mode 100644
index 00000000..1c24f9a8
--- /dev/null
+++ b/.idea/kotlinc.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/visualiser/.idea/workspace.xml b/visualiser/.idea/workspace.xml
index 58b5f16d..8e698fa3 100644
--- a/visualiser/.idea/workspace.xml
+++ b/visualiser/.idea/workspace.xml
@@ -17,12 +17,12 @@
-
+
-
+
@@ -31,8 +31,8 @@
-
-
+
+
@@ -48,14 +48,18 @@
-
+
-
-
+
+
+
+
+
+
@@ -65,19 +69,18 @@
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -86,7 +89,7 @@
-
+
@@ -96,7 +99,7 @@
-
+
@@ -106,7 +109,7 @@
-
+
@@ -116,8 +119,8 @@
-
-
+
+
@@ -128,7 +131,7 @@
-
+
@@ -138,8 +141,8 @@
-
-
+
+
@@ -148,7 +151,7 @@
-
+
@@ -158,7 +161,7 @@
-
+
@@ -211,8 +214,10 @@
DEFINITION_ORDER
-
-
+
+
+
+
@@ -538,6 +543,18 @@
+
+
+
@@ -676,136 +693,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -822,14 +709,6 @@
-
-
-
-
-
-
-
-
@@ -872,15 +751,6 @@
-
-
-
-
-
-
-
-
-
@@ -914,12 +784,6 @@
-
-
-
-
-
-
@@ -948,22 +812,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1025,13 +873,12 @@
-
+
-
@@ -1043,9 +890,7 @@
-
-
-
+
@@ -1053,10 +898,13 @@
-
+
+
+
+
@@ -1074,19 +922,110 @@
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
@@ -1094,7 +1033,6 @@
-
@@ -1102,7 +1040,6 @@
-
@@ -1110,23 +1047,14 @@
-
-
-
-
-
-
-
-
-
+
-
@@ -1134,7 +1062,6 @@
-
@@ -1142,7 +1069,6 @@
-
@@ -1150,15 +1076,6 @@
-
-
-
-
-
-
-
-
-
@@ -1166,7 +1083,6 @@
-
@@ -1174,7 +1090,6 @@
-
@@ -1182,7 +1097,6 @@
-
@@ -1190,10 +1104,6 @@
-
-
-
-
@@ -1201,7 +1111,6 @@
-
@@ -1209,7 +1118,6 @@
-
@@ -1217,25 +1125,26 @@
-
-
-
-
-
+
+
+
+
+
+
-
+
@@ -1245,14 +1154,13 @@
-
-
-
+
+
@@ -1263,14 +1171,13 @@
-
-
-
+
+
@@ -1279,13 +1186,12 @@
-
-
+
@@ -1293,7 +1199,7 @@
-
+
@@ -1301,31 +1207,22 @@
-
+
-
-
-
-
-
-
-
-
-
-
+
@@ -1333,28 +1230,43 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/visualiser/pom.xml b/visualiser/pom.xml
index fd1268de..156c8e60 100644
--- a/visualiser/pom.xml
+++ b/visualiser/pom.xml
@@ -1,4 +1,3 @@
-
4.0.0
@@ -55,23 +54,10 @@
1.0-SNAPSHOT
-
- eu.hansolo
- Medusa
- 7.9
-
-
-
- false
-
- eu.hansolo
- Medusa
- https://dl.bintray.com/hansolo/Medusa
-
maven2-repository.dev.java.net
Java.net repository
@@ -82,18 +68,15 @@
Open Source Geospatial Foundation Repository
http://download.osgeo.org/webdav/geotools/
-
-
-
-
+
- false
+ true
- bintray-hansolo-Medusa
- bintray-plugins
- http://dl.bintray.com/hansolo/Medusa
-
-
+ opengeo
+ OpenGeo Maven Repository
+ http://repo.opengeo.org
+
+
1.8
diff --git a/visualiser/src/main/java/seng302/Controllers/ArrowController.java b/visualiser/src/main/java/seng302/Controllers/ArrowController.java
new file mode 100644
index 00000000..af2113b3
--- /dev/null
+++ b/visualiser/src/main/java/seng302/Controllers/ArrowController.java
@@ -0,0 +1,17 @@
+package seng302.Controllers;
+
+import javafx.fxml.FXML;
+import javafx.scene.layout.Pane;
+
+import java.net.URL;
+import java.util.ResourceBundle;
+
+/**
+ * Created by Joseph on 22/05/2017.
+ */
+public class ArrowController extends Controller {
+
+ @Override
+ public void initialize(URL location, ResourceBundle resources) {
+ }
+}
diff --git a/visualiser/src/main/java/seng302/Controllers/RaceController.java b/visualiser/src/main/java/seng302/Controllers/RaceController.java
index 2a154d61..206aa558 100644
--- a/visualiser/src/main/java/seng302/Controllers/RaceController.java
+++ b/visualiser/src/main/java/seng302/Controllers/RaceController.java
@@ -33,7 +33,7 @@ public class RaceController extends Controller {
private ResizableRaceCanvas raceMap;
private ResizableRaceMap raceBoundaries;
- private Gauge arrow;
+ @FXML Pane arrow;
@FXML SplitPane race;
@FXML StackPane arrowPane;
@FXML CheckBox showFPS;
@@ -116,7 +116,7 @@ public class RaceController extends Controller {
//raceMap.setBoats(newRace.getStartingBoats());
raceMap.draw();
raceMap.setVisible(true);
- raceMap.setArrow(this.arrow);
+ raceMap.setArrow(arrow.getChildren().get(0));
canvasBase.getChildren().add(0, raceMap);
@@ -230,42 +230,43 @@ public class RaceController extends Controller {
}
private void makeArrow() {
- arrow = GaugeBuilder.create()
- .minValue(0)
- .maxValue(359)
- .startAngle(180)
- .angleRange(360)
- .autoScale(false)
- .customTickLabelsEnabled(true)
- .customTickLabels("N", "", "", "", "", "", "", "", "",
- "E", "", "", "", "", "", "", "", "",
- "S", "", "", "", "", "", "", "", "",
- "W", "", "", "", "", "", "", "", "")
- .customTickLabelFontSize(72)
- .needleBehavior(Gauge.NeedleBehavior.OPTIMIZED)
- .borderPaint(Color.web("#1f1e23"))
- .backgroundPaint(Color.web("#1f1e23"))
- .needleColor(Color.web("#dad9db"))
- .tickMarkColor(Color.web("#9f9fa1"))
- .tickLabelColor(Color.web("#dad9db"))
- .valueColor(Color.web("#dad9db"))
- .title("Wind direction")
- .titleColor(Color.web("#dad9db"))
- .knobType(Gauge.KnobType.FLAT)
- .knobColor(Gauge.BRIGHT_COLOR)
- .prefSize(125, 125)
- .maxWidth(125)
- .maxHeight(125)
- .build();
-
- Label value = new Label("0°");
- value.setFont(Fonts.latoBold(72));
- value.setAlignment(Pos.CENTER);
-
- arrow.valueProperty().addListener(o -> {
- value.setText(String.format("%f°", arrow.getValue()));
- });
- arrow.setValue(0);
arrowPane.getChildren().add(arrow);
+// arrow = GaugeBuilder.create()
+// .minValue(0)
+// .maxValue(359)
+// .startAngle(180)
+// .angleRange(360)
+// .autoScale(false)
+// .customTickLabelsEnabled(true)
+// .customTickLabels("N", "", "", "", "", "", "", "", "",
+// "E", "", "", "", "", "", "", "", "",
+// "S", "", "", "", "", "", "", "", "",
+// "W", "", "", "", "", "", "", "", "")
+// .customTickLabelFontSize(72)
+// .needleBehavior(Gauge.NeedleBehavior.OPTIMIZED)
+// .borderPaint(Color.web("#1f1e23"))
+// .backgroundPaint(Color.web("#1f1e23"))
+// .needleColor(Color.web("#dad9db"))
+// .tickMarkColor(Color.web("#9f9fa1"))
+// .tickLabelColor(Color.web("#dad9db"))
+// .valueColor(Color.web("#dad9db"))
+// .title("Wind direction")
+// .titleColor(Color.web("#dad9db"))
+// .knobType(Gauge.KnobType.FLAT)
+// .knobColor(Gauge.BRIGHT_COLOR)
+// .prefSize(125, 125)
+// .maxWidth(125)
+// .maxHeight(125)
+// .build();
+//
+// Label value = new Label("0°");
+// value.setFont(Fonts.latoBold(72));
+// value.setAlignment(Pos.CENTER);
+//
+// arrow.valueProperty().addListener(o -> {
+// value.setText(String.format("%f°", arrow.getValue()));
+// });
+// arrow.setValue(0);
+// arrowPane.getChildren().add(arrow);
}
}
diff --git a/visualiser/src/main/java/seng302/Model/ResizableRaceCanvas.java b/visualiser/src/main/java/seng302/Model/ResizableRaceCanvas.java
index 66c915a4..862f4d84 100644
--- a/visualiser/src/main/java/seng302/Model/ResizableRaceCanvas.java
+++ b/visualiser/src/main/java/seng302/Model/ResizableRaceCanvas.java
@@ -3,6 +3,7 @@ package seng302.Model;
import eu.hansolo.medusa.Gauge;
import eu.hansolo.medusa.GaugeBuilder;
+import javafx.scene.Node;
import javafx.scene.layout.Pane;
import javafx.collections.ObservableList;
import javafx.scene.paint.Color;
@@ -34,7 +35,7 @@ public class ResizableRaceCanvas extends ResizableCanvas {
private List colours;
private final List markers;
private final RaceDataSource raceData;
- private Gauge arrow;
+ private Node arrow;
public ResizableRaceCanvas(RaceDataSource raceData) {
super();
@@ -146,8 +147,8 @@ public class ResizableRaceCanvas extends ResizableCanvas {
private void displayFancyArrow(GraphCoordinate coordinate, double angle) {
angle = angle % 360;
- if (arrow != null && arrow.getValue() != angle) {
- this.arrow.setValue(angle);
+ if (arrow != null && arrow.getRotate() != angle) {
+ arrow.setRotate(angle);
}
}
@@ -341,7 +342,7 @@ public class ResizableRaceCanvas extends ResizableCanvas {
));
}
- public void setArrow(Gauge arrow) {
+ public void setArrow(Node arrow) {
this.arrow = arrow;
}
diff --git a/visualiser/src/main/resources/images/arrow.png b/visualiser/src/main/resources/images/arrow.png
new file mode 100644
index 00000000..fab6e21d
Binary files /dev/null and b/visualiser/src/main/resources/images/arrow.png differ
diff --git a/visualiser/src/main/resources/scenes/race.fxml b/visualiser/src/main/resources/scenes/race.fxml
index 46d9c717..32f3f9ce 100644
--- a/visualiser/src/main/resources/scenes/race.fxml
+++ b/visualiser/src/main/resources/scenes/race.fxml
@@ -19,6 +19,7 @@
+