// connect signals and slots
simulationStatistic.observable.addObserver(new Observer() {
@Override
public void update(Observable o, Object arg) {
if (arg instanceof ObserverNotification) {
final ObserverNotification notification = (ObserverNotification) arg;
final NotificationType type = notification.getType();
if (type.equals(NotificationType.simulationStatisticClosed)) {
onSimulationStatisticClosed();
}
}
}
});
dump = new SumoDump();
dump.addObserver(new Observer() {
@Override
public void update(Observable o, Object arg) {
if (arg instanceof ObserverNotification) {
final ObserverNotification notification = (ObserverNotification) arg;
final NotificationType type = notification.getType();
if (type.equals(NotificationType.importSuccessful)) {
onNewImport();
}
}
}
});
/*
StatisticsDataManager.getInstance().sumoSimDone.connect(
this, "onSimulationFinished(String)");
*/
TriggerSumo.getInstance().observable.addObserver(new Observer() {
@Override
public void update(Observable o, Object arg) {
if (arg instanceof ObserverNotification) {
final ObserverNotification notification = (ObserverNotification) arg;
final NotificationType type = notification.getType();
if (type.equals(NotificationType.sumoDone)) {
onSimulationFinished((String) arg);
}
}