added the ability to toggle the race guide line on and off
#story[1087]
This commit is contained in:
@@ -40,6 +40,7 @@ public class Annotations {
|
||||
private static String pathCheckAnno = "showBoatPath";
|
||||
private static String timeCheckAnno = "showTime";
|
||||
private static String estTimeCheckAnno = "showEstTime";
|
||||
private static String guideLineAnno = "showGuideline";
|
||||
|
||||
// string values match the fx:id value of radio buttons
|
||||
private static String noBtn = "noBtn";
|
||||
@@ -160,6 +161,16 @@ public class Annotations {
|
||||
raceMap.draw();
|
||||
}
|
||||
});
|
||||
|
||||
//listener to show estimated time for annotation
|
||||
checkBoxes.get(guideLineAnno).selectedProperty()
|
||||
.addListener((ov, old_val, new_val) -> {
|
||||
if (old_val != new_val) {
|
||||
raceMap.toggleGuideLine();
|
||||
storeCurrentAnnotationState(guideLineAnno, new_val);
|
||||
raceMap.draw();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -49,6 +49,7 @@ public class ResizableRaceCanvas extends ResizableCanvas {
|
||||
private boolean annoPath = true;
|
||||
private boolean annoEstTime = true;
|
||||
private boolean annoTimeSinceLastMark = true;
|
||||
private boolean annoGuideLine = false;
|
||||
|
||||
|
||||
|
||||
@@ -116,6 +117,13 @@ public class ResizableRaceCanvas extends ResizableCanvas {
|
||||
annoSpeed = !annoSpeed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle the guideline annotation
|
||||
*/
|
||||
public void toggleGuideLine() {
|
||||
annoGuideLine = !annoGuideLine;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -470,7 +478,9 @@ public class ResizableRaceCanvas extends ResizableCanvas {
|
||||
drawBoundary();
|
||||
|
||||
//Guiding Line
|
||||
drawRaceLine();
|
||||
if (annoGuideLine){
|
||||
drawRaceLine();
|
||||
}
|
||||
|
||||
//Boats.
|
||||
drawBoats();
|
||||
|
||||
Reference in New Issue
Block a user