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{ else{
bg.setWakeVisible(false); bg.setWakeVisible(false);
} }
if (importantAnnotations.getAnnotationState(Annotation.ESTTIMETONEXTMARK)) {
bg.setEstTimeToNextMarkVisible(true);
}
else {
bg.setEstTimeToNextMarkVisible(false);
}
} }
private void setAnnotations(Integer annotationLevel) { private void setAnnotations(Integer annotationLevel) {
@@ -7,5 +7,6 @@ public enum Annotation {
SPEED, SPEED,
WAKE, WAKE,
TRACK, TRACK,
NAME NAME,
ESTTIMETONEXTMARK
} }
@@ -94,8 +94,8 @@ public class ImportantAnnotationController implements Initializable {
boatNameSelect.setSelected(importantAnnotationsState.getAnnotationState(annotation)); boatNameSelect.setSelected(importantAnnotationsState.getAnnotationState(annotation));
break; break;
case "BoatEstTimeToNextMark": case ESTTIMETONEXTMARK:
boatEstTimeToNextMarkSelect.setSelected(importantAnnotations.get(key)); boatEstTimeToNextMarkSelect.setSelected(importantAnnotationsState.getAnnotationState(annotation));
break; break;
default: default:
@@ -115,11 +115,7 @@ public class ImportantAnnotationController implements Initializable {
boatSpeedSelect.setOnAction(event -> setAnnotation(Annotation.SPEED, boatSpeedSelect.isSelected())); boatSpeedSelect.setOnAction(event -> setAnnotation(Annotation.SPEED, boatSpeedSelect.isSelected()));
boatTrackSelect.setOnAction(event -> setAnnotation(Annotation.TRACK, boatTrackSelect.isSelected())); boatTrackSelect.setOnAction(event -> setAnnotation(Annotation.TRACK, boatTrackSelect.isSelected()));
boatNameSelect.setOnAction(event -> setAnnotation(Annotation.NAME, boatNameSelect.isSelected())); boatNameSelect.setOnAction(event -> setAnnotation(Annotation.NAME, boatNameSelect.isSelected()));
boatEstTimeToNextMarkSelect.setOnAction(event -> setAnnotation(Annotation.ESTTIMETONEXTMARK, boatEstTimeToNextMarkSelect.isSelected()));
boatEstTimeToNextMarkSelect.setOnAction(event -> {
setAnnotation("BoatEstTimeToNextMark", boatEstTimeToNextMarkSelect.isSelected());
sendUpdate();
});
closeButton.setOnAction(event -> stage.close()); closeButton.setOnAction(event -> stage.close());
} }