Modified RaceClock to support arbitrary start times

- Amended RaceDataSource interface to require time instead of mark for calculating time.
#story[758]
This commit is contained in:
cbt24
2017-04-25 13:00:45 +12:00
parent 22075ee415
commit a59342a668
7 changed files with 51 additions and 192 deletions
@@ -133,7 +133,7 @@ public class RaceController extends Controller {
//Initialize save annotation array, fps listener, and annotation listeners
//timezone
RaceClock raceClock = new RaceClock(raceData.getMark());
RaceClock raceClock = new RaceClock(raceData.getZonedDateTime());
timeZone.setText(raceClock.getTimeZone());
initializeFPS();
initializeAnnotations();
@@ -103,8 +103,8 @@ public class StartController extends Controller {
boatNameColumn.setCellValueFactory(cellData -> cellData.getValue().getName());
boatCodeColumn.setCellValueFactory(new PropertyValueFactory<>("abbrev"));
//timezone
raceClock = new RaceClock(raceData.getMark());
timeZoneTime.textProperty().bind(raceClock.timeProperty());
raceClock = new RaceClock(raceData.getZonedDateTime());
timeZoneTime.textProperty().bind(raceClock.timeStringProperty());
}