Refactored mock.Event to work with MockRace.
Fixed the networking imports. Race now keeps a reference to its Race, Boat, and Regatta data sources. VisualiserRace can be provided with new Race/Boat/Regatta data sources during runtime. Currently it updates boundary and legs with a new RaceDataSource, and marker boats with a new BoatDataSource.
This commit is contained in:
@@ -14,6 +14,7 @@ import javafx.scene.paint.Color;
|
||||
import visualiser.model.RaceClock;
|
||||
import visualiser.model.Sparkline;
|
||||
import visualiser.model.VisualiserBoat;
|
||||
import visualiser.model.VisualiserRace;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
@@ -69,7 +70,7 @@ public class RaceController extends Controller {
|
||||
*
|
||||
* @param race Race to listen to.
|
||||
*/
|
||||
public void setInfoTable(StreamedRace race) {
|
||||
public void setInfoTable(VisualiserRace race) {
|
||||
boatInfoTable.setItems(race.getStartingBoats());
|
||||
boatTeamColumn.setCellValueFactory(cellData -> cellData.getValue().getName());
|
||||
boatSpeedColumn.setCellValueFactory(cellData -> cellData.getValue().getVelocityProp());
|
||||
|
||||
Reference in New Issue
Block a user