RoadsideUnit receivingRoadsideUnit = (RoadsideUnit) model;
modelController.receiveNetworkMessage(receivingRoadsideUnit.getID(),
receivingRoadsideUnit.getReceivedMessageID());
}
else if (model instanceof TrafficLight) {
TrafficLight receivingTrafficLight = (TrafficLight) model;
modelController.receiveNetworkMessage(receivingTrafficLight.getID(),
receivingTrafficLight.getReceivedMessageID());
}
}
};
try {
if (EventQueue.isDispatchThread()) {