Search in sources :

Example 1 with BeforeStepForwardEvent

use of edu.uah.rsesc.aadlsimulator.ui.events.BeforeStepForwardEvent in project AGREE by loonwerks.

the class DefaultSimulationUIService method prepareToStepForward.

public void prepareToStepForward() throws StepForwardCanceledException {
    final BeforeStepForwardEvent beforeStepForwardEvent = new BeforeStepForwardEvent();
    eventBroker.send(SimulatorUIEvents.BEFORE_STEP_FORWARD, beforeStepForwardEvent);
    if (beforeStepForwardEvent.isStepCanceled()) {
        throw new StepForwardCanceledException(beforeStepForwardEvent.getCancellationReason());
    }
}
Also used : BeforeStepForwardEvent(edu.uah.rsesc.aadlsimulator.ui.events.BeforeStepForwardEvent) StepForwardCanceledException(edu.uah.rsesc.aadlsimulator.ui.services.StepForwardCanceledException)

Aggregations

BeforeStepForwardEvent (edu.uah.rsesc.aadlsimulator.ui.events.BeforeStepForwardEvent)1 StepForwardCanceledException (edu.uah.rsesc.aadlsimulator.ui.services.StepForwardCanceledException)1