Added adjustments that PO requested

- hide will not deselect all checkboxes
- visible will now show all checkboxes that were deselected when hidden
- partial will now select abbreviation and speed only
- when another checkbox is selected/deselected from partial,hidden or important it will immediately jump to visible radio button.
#story[877]
This commit is contained in:
Fan-Wu Yang
2017-05-24 22:24:37 +12:00
parent 671d62aeb1
commit debc5d9c38
2 changed files with 123 additions and 33 deletions
@@ -23,7 +23,6 @@ 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;
private boolean annoSpeed = true;
@@ -240,26 +239,6 @@ public class ResizableRaceCanvas extends ResizableCanvas {
}
}
/**
* Toggle the raceAnno value
*/
public void toggleAnnotations() {
raceAnno = !raceAnno;
}
/**
* Shows the race Annotations
*/
public void showAnnotations(){
raceAnno = true;
}
/**
* Hides the Race ANnotations
*/
public void hideAnnotations(){
raceAnno = false;
}
/**
* Toggle name display in annotation
@@ -309,8 +288,7 @@ public class ResizableRaceCanvas extends ResizableCanvas {
displayBoat(boat, 0, colours.get(currentColour));
}
if (raceAnno)
displayText(boat.toString(), boat.getAbbrev(), boat.getVelocity(), this.map.convertGPS(boat.getCurrentPosition()));
displayText(boat.toString(), boat.getAbbrev(), boat.getVelocity(), this.map.convertGPS(boat.getCurrentPosition()));
//TODO this needs to be fixed.
drawTrack(boat, colours.get(currentColour));
currentColour = (currentColour + 1) % colours.size();
@@ -324,7 +302,7 @@ public class ResizableRaceCanvas extends ResizableCanvas {
* @see seng302.Model.TrackPoint
*/
private void drawTrack(Boat boat, Color colour) {
if (annoPath && raceAnno) {
if (annoPath) {
for (TrackPoint point : boat.getTrack()) {
GraphCoordinate scaledCoordinate = this.map.convertGPS(point.getCoordinate());
gc.setFill(new Color(colour.getRed(), colour.getGreen(), colour.getBlue(), point.getAlpha()));