|
|
|
@ -29,6 +29,7 @@ public class ResizableRaceCanvas extends Canvas {
|
|
|
|
private boolean annoName = true;
|
|
|
|
private boolean annoName = true;
|
|
|
|
private boolean annoAbbrev = true;
|
|
|
|
private boolean annoAbbrev = true;
|
|
|
|
private boolean annoSpeed = true;
|
|
|
|
private boolean annoSpeed = true;
|
|
|
|
|
|
|
|
private boolean annoPath = true;
|
|
|
|
private ArrayList<GPSCoordinate> raceBoundaries;
|
|
|
|
private ArrayList<GPSCoordinate> raceBoundaries;
|
|
|
|
double[] xpoints = {}, ypoints = {};
|
|
|
|
double[] xpoints = {}, ypoints = {};
|
|
|
|
|
|
|
|
|
|
|
|
@ -298,6 +299,14 @@ public class ResizableRaceCanvas extends Canvas {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void toggleBoatPath() {
|
|
|
|
|
|
|
|
if (annoPath) {
|
|
|
|
|
|
|
|
annoPath = false;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
annoPath = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Toggle abbreviation display in annotation
|
|
|
|
* Toggle abbreviation display in annotation
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -353,11 +362,13 @@ public class ResizableRaceCanvas extends Canvas {
|
|
|
|
* @see seng302.Model.TrackPoint
|
|
|
|
* @see seng302.Model.TrackPoint
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private void drawTrack(BoatInRace boat) {
|
|
|
|
private void drawTrack(BoatInRace boat) {
|
|
|
|
for (TrackPoint point : boat.getTrack()) {
|
|
|
|
if (annoPath) {
|
|
|
|
GraphCoordinate scaledCoordinate = this.map.convertGPS(point.getCoordinate());
|
|
|
|
for (TrackPoint point : boat.getTrack()) {
|
|
|
|
Color boatColour = boat.getColour();
|
|
|
|
GraphCoordinate scaledCoordinate = this.map.convertGPS(point.getCoordinate());
|
|
|
|
gc.setFill(new Color(boatColour.getRed(), boatColour.getGreen(), boatColour.getBlue(), point.getAlpha()));
|
|
|
|
Color boatColour = boat.getColour();
|
|
|
|
gc.fillOval(scaledCoordinate.getX(), scaledCoordinate.getY(), 5, 5);
|
|
|
|
gc.setFill(new Color(boatColour.getRed(), boatColour.getGreen(), boatColour.getBlue(), point.getAlpha()));
|
|
|
|
|
|
|
|
gc.fillOval(scaledCoordinate.getX(), scaledCoordinate.getY(), 5, 5);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|