added the ability to toggle the race guide line on and off

#story[1087]
This commit is contained in:
hba56
2017-08-10 12:17:19 +12:00
parent 74f04a13f8
commit 4da3734804
3 changed files with 36 additions and 9 deletions
@@ -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();
}
});
}
/**