}
@Override
protected void initListeners() {
viewContext.addViewContextChangeListener("Execute", new ViewContextChangeListener() {
public void contextChange(ViewContextChangeEvent evt) {
frame.setState(Frame.ICONIFIED);
final Window scenarioWindow = ((Scenario) viewContext.get("Scenario")).launch();
if (scenarioWindow != null)
scenarioWindow .addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
scenarioWindow.removeWindowListener(this);
frame.setState(Frame.NORMAL);
frame.toFront();
}
});
}
});
viewContext.addViewContextChangeListener("Scenario", new ViewContextChangeListener() {
public void contextChange(ViewContextChangeEvent evt) {
descriptionArea.setText(((Scenario) viewContext.get("Scenario")).getDescription());
sourceArea.setText(((Scenario) viewContext.get("Scenario")).getSource());
}
});