Merge commit '7990ac9d2ee8c71d50606813e21a0674f442464f' into story31.2_alternateTack.
This commit (7990ac9d2e) was the commit from master that story49 was merged into.
Everything appears to be working.
# Conflicts:
# mock/src/main/java/seng302/App.java
# mock/src/main/java/seng302/Constants.java
# mock/src/main/java/seng302/DataInput/RaceXMLReader.java
# mock/src/main/java/seng302/DataInput/RegattaXMLReader.java
# mock/src/main/java/seng302/Model/Boat.java
# mock/src/main/java/seng302/Model/Event.java
# mock/src/main/java/seng302/Model/Race.java
# mock/src/test/java/seng302/Data/BoatDataTest.java
# mock/src/test/java/seng302/Data/RaceDataTest.java
# mock/src/test/java/seng302/Model/BoatTest.java
# mock/src/test/java/seng302/Model/RaceXMLTest.java
# visualiser/src/main/java/seng302/Controllers/StartController.java
# visualiser/src/main/java/seng302/RaceXMLReader.java
Manually resolved conflicts. :(
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
package seng302.Model;
|
||||
|
||||
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.scene.paint.Paint;
|
||||
import javafx.scene.transform.Rotate;
|
||||
import seng302.GPSCoordinate;
|
||||
import seng302.GraphCoordinate;
|
||||
import seng302.Mock.StreamedCourse;
|
||||
import seng302.RaceDataSource;
|
||||
@@ -22,6 +22,7 @@ import java.util.List;
|
||||
public class ResizableRaceCanvas extends ResizableCanvas {
|
||||
private RaceMap map;
|
||||
private List<Boat> boats;
|
||||
private List<Marker> boatMarkers;
|
||||
private boolean raceAnno = true;
|
||||
private boolean annoName = true;
|
||||
private boolean annoAbbrev = true;
|
||||
@@ -29,7 +30,6 @@ public class ResizableRaceCanvas extends ResizableCanvas {
|
||||
private boolean annoPath = true;
|
||||
private List<Color> colours;
|
||||
private final List<Marker> markers;
|
||||
double[] xpoints = {}, ypoints = {};
|
||||
private final RaceDataSource raceData;
|
||||
|
||||
public ResizableRaceCanvas(RaceDataSource raceData) {
|
||||
@@ -56,6 +56,16 @@ public class ResizableRaceCanvas extends ResizableCanvas {
|
||||
this.boats = boats;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the boat markers that are to be displayed in this race.
|
||||
*
|
||||
* @param boatMarkers in race
|
||||
*/
|
||||
public void setBoatMarkers(ObservableList<Marker> boatMarkers) {
|
||||
this.boatMarkers = boatMarkers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the RaceMap that the RaceCanvas is to be displaying for.
|
||||
*
|
||||
@@ -65,22 +75,6 @@ public class ResizableRaceCanvas extends ResizableCanvas {
|
||||
this.map = map;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the mark of a race as a circle.
|
||||
*
|
||||
* @param graphCoordinate Latitude and Longitude in GraphCoordinate that it
|
||||
* is to be displayed as.
|
||||
* @param paint Colour the mark is to be coloured.
|
||||
* @see GraphCoordinate
|
||||
* @see Color
|
||||
* @see Paint
|
||||
*/
|
||||
public void displayMark(GraphCoordinate graphCoordinate, Paint paint) {
|
||||
double d = 25;
|
||||
this.gc.setFill(paint);
|
||||
gc.fillOval(graphCoordinate.getX() - (d / 2), graphCoordinate.getY() - (d / 2), d, d);
|
||||
}
|
||||
|
||||
private void displayBoat(Boat boat, double angle, Color colour) {
|
||||
if (boat.getCurrentPosition() != null) {
|
||||
GraphCoordinate pos = this.map.convertGPS(boat.getCurrentPosition());
|
||||
@@ -246,19 +240,6 @@ public class ResizableRaceCanvas extends ResizableCanvas {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws a boat at a certain GPSCoordinate
|
||||
*
|
||||
* @param colour Colour to colour boat.
|
||||
* @param gpsCoordinates GPScoordinate that the boat is to be drawn at.
|
||||
* @see GPSCoordinate
|
||||
* @see Color
|
||||
*/
|
||||
public void drawBoat(Color colour, GPSCoordinate gpsCoordinates) {
|
||||
GraphCoordinate graphCoordinate = this.map.convertGPS(gpsCoordinates);
|
||||
displayPoint(graphCoordinate, colour);
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle the raceAnno value
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user