Attempted to load details in, but ran into problems with the string property/vs string distinction

#pair[jam330] #story[760]
main
Erika Savell 9 years ago
parent 58cae682ab
commit 8112918c13

@ -3,6 +3,7 @@ package seng302.Controllers;
import javafx.fxml.FXML;
import javafx.scene.control.SplitPane;
import javafx.scene.layout.GridPane;
import seng302.RaceXMLReader;
import java.net.URL;
import java.util.ResourceBundle;
@ -20,8 +21,6 @@ public class MainController extends Controller {
}
/**
* Main Controller for the applications will house the menu and the displayed pane.
*

@ -96,6 +96,7 @@ public class RaceController extends Controller {
* @param scaleFactor scale value of race
*/
public void startRace(int scaleFactor) {
RaceXMLReader raceXMLReader = null;
try {
raceXMLReader = new RaceXMLReader("raceXML/bermuda_AC35.xml");

@ -1,8 +1,20 @@
package seng302.Controllers;
import javafx.beans.property.StringProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.layout.GridPane;
import org.xml.sax.SAXException;
import seng302.Model.Boat;
import seng302.Model.BoatInRace;
import seng302.RaceXMLReader;
import javax.xml.parsers.ParserConfigurationException;
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
@ -13,6 +25,12 @@ public class StartController extends Controller {
@FXML private GridPane start;
@FXML TableView<BoatInRace> boatNameTable;
@FXML
TableColumn<BoatInRace, String> boatNameColumn;
@FXML
TableColumn<BoatInRace, String> boatCodeColumn;
/**
* Begins the race with a scale factor of 15
*/
@ -36,12 +54,35 @@ public class StartController extends Controller {
private void startRace(Integer raceScale){
start.setVisible(false);
parent.beginRace(raceScale);
}
@Override
public void initialize(URL location, ResourceBundle resources){
}
private void initialiseTables() {
RaceXMLReader raceXMLReader = null;
try {
raceXMLReader = new RaceXMLReader("raceXML/bermuda_AC35.xml");
} catch (IOException e) {
e.printStackTrace();
} catch (SAXException e) {
e.printStackTrace();
} catch (ParserConfigurationException e) {
e.printStackTrace();
}
BoatInRace[] boats = new BoatInRace[raceXMLReader.getBoats().size()];
boats = raceXMLReader.getBoats().toArray(boats);
ObservableList<BoatInRace> observableBoats = FXCollections.observableArrayList(boats);
}
}

Loading…
Cancel
Save