Sparkline methods Javadoc'd

- createSparkline
- updateSparkline

#story[876]
main
Jessica McAuslin 9 years ago
parent 3f2ad8886e
commit ef9d8884d4

@ -95,6 +95,13 @@ public class RaceController extends Controller {
}); });
} }
/**
* Creates and sets initial display for Sparkline for race positions.
* A data series for each boat in the race is added.
* Position numbers are displayed.
*
* @param boats boats to display on the sparkline
*/
public void createSparkLine(ObservableList<Boat> boats){ public void createSparkLine(ObservableList<Boat> boats){
// NOTE: Y axis is in negatives to display correct positions // NOTE: Y axis is in negatives to display correct positions
@ -221,6 +228,12 @@ public class RaceController extends Controller {
}); });
} }
/**
* Updates the sparkline to display current boat positions.
* New points are plotted to represent each boat when required.
*
* @param boatsInRace used for current boat positions.
*/
public void updateSparkline(ObservableList<Boat> boatsInRace){ public void updateSparkline(ObservableList<Boat> boatsInRace){
int placingVal = boatsInRace.size(); int placingVal = boatsInRace.size();
sparkLineNumber++; sparkLineNumber++;

Loading…
Cancel
Save