I had accidentally broken the raceXML construction - fixed it.

Fixed a few issues where boat didn't have nextMark/previousMark times under certain circumstances.
LatestMessages wasn't actually notifying properly - fixed.
The various XML readers now treat a string constructor as containing file contents, not file name - this was how it was mostly already used.
Fixed some issues in RaceXMLReader, including where element.getChildNodes() was used instead of element.getElementsByName(...).
Boat: changes speed to a doubleProperty. Changed leg to a Property<Leg>.
Race.lastFps is now an IntegerProperty.
Added breaks to the case statements in VisualiserInput. Whoops.
ResizableRaceCanvas now handles drawing the race boundary. Tidied up code a bit.
Removed ResizableRaceMap.

Started refactoring Sparkline. Currently doesn't work.
This commit is contained in:
fjc40
2017-07-10 08:35:43 +12:00
parent abbbf70146
commit 7d3cf6ee80
38 changed files with 1414 additions and 775 deletions
@@ -72,6 +72,7 @@ public class Event {
} catch (XMLReaderException | InvalidBoatDataException | InvalidRaceDataException | InvalidRegattaDataException e) {
e.printStackTrace();
//TODO if this occurs, we should print and error and abort.
}
}
@@ -89,7 +90,7 @@ public class Event {
/**
* Sets the xml description of the race to show the race was created now, and starts in 4 minutes
* @param raceXML
* @param raceXML The race.xml contents.
* @return String containing edited xml
*/
private String getRaceXMLAtCurrentTime(String raceXML) {
@@ -102,9 +103,9 @@ public class Event {
DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssZ");
ZonedDateTime creationTime = ZonedDateTime.now();
raceXML.replace("CREATION_TIME", dateFormat.format(creationTime));
raceXML = raceXML.replace("CREATION_TIME", dateFormat.format(creationTime));
raceXML.replace("START_TIME", dateFormat.format(creationTime.plusSeconds(secondsToAdd)));
raceXML = raceXML.replace("START_TIME", dateFormat.format(creationTime.plusSeconds(secondsToAdd)));
return raceXML;