|
|
|
|
@ -1,6 +1,5 @@
|
|
|
|
|
package visualiser.Controllers;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.interactivemesh.jfx.importer.stl.StlMeshImporter;
|
|
|
|
|
import javafx.animation.AnimationTimer;
|
|
|
|
|
import javafx.application.Platform;
|
|
|
|
|
@ -13,7 +12,6 @@ import javafx.scene.chart.LineChart;
|
|
|
|
|
import javafx.scene.control.*;
|
|
|
|
|
import javafx.scene.input.KeyCode;
|
|
|
|
|
import javafx.scene.input.KeyEvent;
|
|
|
|
|
import javafx.scene.layout.AnchorPane;
|
|
|
|
|
import javafx.scene.layout.GridPane;
|
|
|
|
|
import javafx.scene.layout.Pane;
|
|
|
|
|
import javafx.scene.layout.StackPane;
|
|
|
|
|
@ -24,7 +22,6 @@ import shared.model.Leg;
|
|
|
|
|
import visualiser.app.App;
|
|
|
|
|
import visualiser.gameController.ControllerClient;
|
|
|
|
|
import visualiser.gameController.Keys.ControlKey;
|
|
|
|
|
import visualiser.gameController.Keys.KeyFactory;
|
|
|
|
|
import visualiser.layout.Subject3D;
|
|
|
|
|
import visualiser.layout.View3D;
|
|
|
|
|
import visualiser.model.*;
|
|
|
|
|
@ -56,11 +53,6 @@ public class RaceController extends Controller {
|
|
|
|
|
|
|
|
|
|
private boolean isHost;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The sparkline graph.
|
|
|
|
|
*/
|
|
|
|
|
private Sparkline sparkline;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* state of the info table
|
|
|
|
|
*/
|
|
|
|
|
@ -78,11 +70,6 @@ public class RaceController extends Controller {
|
|
|
|
|
|
|
|
|
|
@FXML private SplitPane race;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* This is the root node of the arrow control.
|
|
|
|
|
*/
|
|
|
|
|
@FXML private Pane arrow;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* This is the pane we place the actual arrow control inside of.
|
|
|
|
|
*/
|
|
|
|
|
@ -169,9 +156,6 @@ public class RaceController extends Controller {
|
|
|
|
|
//Information table.
|
|
|
|
|
initialiseInfoTable(this.visualiserRace);
|
|
|
|
|
|
|
|
|
|
//Sparkline.
|
|
|
|
|
initialiseSparkline(this.visualiserRace);
|
|
|
|
|
|
|
|
|
|
//Arrow.
|
|
|
|
|
initialiseArrow(this.visualiserRace);
|
|
|
|
|
|
|
|
|
|
@ -362,16 +346,6 @@ public class RaceController extends Controller {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Initialises the {@link Sparkline}, and listens to a specified {@link VisualiserRaceEvent}.
|
|
|
|
|
* @param race The race to listen to.
|
|
|
|
|
*/
|
|
|
|
|
private void initialiseSparkline(VisualiserRaceEvent race) {
|
|
|
|
|
//The race.getBoats() we are passing in is sorted by position in race inside the race class.
|
|
|
|
|
this.sparkline = new Sparkline(this.visualiserRace.getVisualiserRaceState(), this.sparklineChart);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Initialises the race time zone label with the race's time zone.
|
|
|
|
|
* @param race The race to get time zone from.
|
|
|
|
|
|