LatestMessages can hold MarkRounding messages. It also holds XMLMessage for each message type.
MockOutput now uses LatestMessages for xml messages. Moved xml message encoding into RaceVisionByteEncoder. Removed XMLMessageEncoder. Moved XML message sub types into an enumeration (XMLMessageType). XMLMessage can now be queried for its attributes (like timestamp, length, etc...). VisualiserInput now uses LatestMessages. VisualiserInput now (as it did previously) uses switch statements for checking packet type, instead of if statements. VisualiserRace now uses LatestMessages instead of VisualiserInput.
This commit is contained in:
@@ -8,7 +8,7 @@ import javafx.scene.control.TableColumn;
|
||||
import javafx.scene.control.TableView;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import seng302.RaceConnection;
|
||||
import visualiser.model.RaceConnection;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.Socket;
|
||||
@@ -22,7 +22,7 @@ public class ConnectionController extends Controller {
|
||||
@FXML
|
||||
private AnchorPane connectionWrapper;
|
||||
@FXML
|
||||
private TableView connectionTable;
|
||||
private TableView<RaceConnection> connectionTable;
|
||||
@FXML
|
||||
private TableColumn<RaceConnection, String> hostnameColumn;
|
||||
@FXML
|
||||
@@ -73,7 +73,7 @@ public class ConnectionController extends Controller {
|
||||
*/
|
||||
public void connectSocket() {
|
||||
try{
|
||||
RaceConnection connection = (RaceConnection)connectionTable.getSelectionModel().getSelectedItem();
|
||||
RaceConnection connection = connectionTable.getSelectionModel().getSelectedItem();
|
||||
Socket socket = new Socket(connection.getHostname(), connection.getPort());
|
||||
connectionWrapper.setVisible(false);
|
||||
parent.enterLobby(socket);
|
||||
|
||||
Reference in New Issue
Block a user