Fixed Annotation.java, ImportantAnnotationController.java, RaceViewController.java to include estimate time to next mark after merge

#story[924]
This commit is contained in:
Zhi You Tan
2017-05-15 10:36:20 +12:00
parent 04b105d74b
commit 39efafc75f
3 changed files with 12 additions and 8 deletions
@@ -340,6 +340,13 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
else{
bg.setWakeVisible(false);
}
if (importantAnnotations.getAnnotationState(Annotation.ESTTIMETONEXTMARK)) {
bg.setEstTimeToNextMarkVisible(true);
}
else {
bg.setEstTimeToNextMarkVisible(false);
}
}
private void setAnnotations(Integer annotationLevel) {
@@ -7,5 +7,6 @@ public enum Annotation {
SPEED,
WAKE,
TRACK,
NAME
NAME,
ESTTIMETONEXTMARK
}
@@ -94,8 +94,8 @@ public class ImportantAnnotationController implements Initializable {
boatNameSelect.setSelected(importantAnnotationsState.getAnnotationState(annotation));
break;
case "BoatEstTimeToNextMark":
boatEstTimeToNextMarkSelect.setSelected(importantAnnotations.get(key));
case ESTTIMETONEXTMARK:
boatEstTimeToNextMarkSelect.setSelected(importantAnnotationsState.getAnnotationState(annotation));
break;
default:
@@ -115,11 +115,7 @@ public class ImportantAnnotationController implements Initializable {
boatSpeedSelect.setOnAction(event -> setAnnotation(Annotation.SPEED, boatSpeedSelect.isSelected()));
boatTrackSelect.setOnAction(event -> setAnnotation(Annotation.TRACK, boatTrackSelect.isSelected()));
boatNameSelect.setOnAction(event -> setAnnotation(Annotation.NAME, boatNameSelect.isSelected()));
boatEstTimeToNextMarkSelect.setOnAction(event -> {
setAnnotation("BoatEstTimeToNextMark", boatEstTimeToNextMarkSelect.isSelected());
sendUpdate();
});
boatEstTimeToNextMarkSelect.setOnAction(event -> setAnnotation(Annotation.ESTTIMETONEXTMARK, boatEstTimeToNextMarkSelect.isSelected()));
closeButton.setOnAction(event -> stage.close());
}