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:
@@ -14,13 +14,13 @@ import java.util.Map;
|
||||
/**
|
||||
* Class that processes user selected annotation visibility options to
|
||||
* display the requested information on the
|
||||
* {@link seng302.Model.ResizableRaceMap ResizbleRaceMap}. These are displayed
|
||||
* via the {@link seng302.Controllers.RaceController RaceController}. <br>
|
||||
* Annotation options for a {@link seng302.Model.Boat Boat} include: its name,
|
||||
* {@link ResizableRaceCanvas}. These are displayed
|
||||
* via the {@link visualiser.Controllers.RaceController}. <br>
|
||||
* Annotation options for a {@link VisualiserBoat} include: its name,
|
||||
* abbreviation, speed, the time since it passed the last
|
||||
* {@link seng302.Model.Marker Marker}, estimated time to the next marker,
|
||||
* {@link shared.model.Mark}, estimated time to the next marker,
|
||||
* and a path it has travelled made up of
|
||||
* {@link seng302.Model.TrackPoint TrackPoint}s.
|
||||
* {@link TrackPoint}s.
|
||||
*/
|
||||
public class Annotations {
|
||||
private ResizableRaceCanvas raceMap;
|
||||
@@ -107,7 +107,7 @@ public class Annotations {
|
||||
if (old_val != new_val) {
|
||||
raceMap.toggleAnnoName();
|
||||
storeCurrentAnnotationState(nameCheckAnno, new_val);
|
||||
raceMap.update();
|
||||
raceMap.draw();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -117,7 +117,7 @@ public class Annotations {
|
||||
if (old_val != new_val) {
|
||||
raceMap.toggleAnnoAbbrev();
|
||||
storeCurrentAnnotationState(abbrevCheckAnno, new_val);
|
||||
raceMap.update();
|
||||
raceMap.draw();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -127,7 +127,7 @@ public class Annotations {
|
||||
if (old_val != new_val) {
|
||||
raceMap.toggleBoatPath();
|
||||
storeCurrentAnnotationState(pathCheckAnno, new_val);
|
||||
raceMap.update();
|
||||
raceMap.draw();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -137,7 +137,7 @@ public class Annotations {
|
||||
if (old_val != new_val) {
|
||||
raceMap.toggleAnnoSpeed();
|
||||
storeCurrentAnnotationState(speedCheckAnno, new_val);
|
||||
raceMap.update();
|
||||
raceMap.draw();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -147,7 +147,7 @@ public class Annotations {
|
||||
if (old_val != new_val) {
|
||||
raceMap.toggleAnnoTime();
|
||||
storeCurrentAnnotationState(timeCheckAnno, new_val);
|
||||
raceMap.update();
|
||||
raceMap.draw();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -157,7 +157,7 @@ public class Annotations {
|
||||
if (old_val != new_val) {
|
||||
raceMap.toggleAnnoEstTime();
|
||||
storeCurrentAnnotationState(estTimeCheckAnno, new_val);
|
||||
raceMap.update();
|
||||
raceMap.draw();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -191,7 +191,7 @@ public class Annotations {
|
||||
for (Map.Entry<String, CheckBox> checkBox : checkBoxes.entrySet()){
|
||||
checkBox.getValue().setSelected(false);
|
||||
}
|
||||
raceMap.update();
|
||||
raceMap.draw();
|
||||
buttonChecked = noBtn;
|
||||
prevBtnChecked = hideBtn;
|
||||
selectShow = true;
|
||||
@@ -206,7 +206,7 @@ public class Annotations {
|
||||
checkBox.getValue().setSelected(
|
||||
annoShownBeforeHide.get(checkBox.getKey()));
|
||||
}
|
||||
raceMap.update();
|
||||
raceMap.draw();
|
||||
buttonChecked = noBtn;
|
||||
prevBtnChecked = showBtn;
|
||||
}
|
||||
@@ -226,7 +226,7 @@ public class Annotations {
|
||||
}
|
||||
else { checkBox.getValue().setSelected(false); }
|
||||
}
|
||||
raceMap.update();
|
||||
raceMap.draw();
|
||||
buttonChecked = noBtn;
|
||||
prevBtnChecked = partialBtn;
|
||||
selectShow = true;
|
||||
@@ -243,6 +243,7 @@ public class Annotations {
|
||||
(importantAnno.get(checkBox.getKey()));
|
||||
}
|
||||
}
|
||||
raceMap.draw();
|
||||
buttonChecked = noBtn;
|
||||
prevBtnChecked = importantBtn;
|
||||
selectShow = true;
|
||||
|
||||
Reference in New Issue
Block a user