Closedown

This commit is contained in:
boccioli_m
2015-06-03 14:59:45 +02:00
parent bcb4b01cf1
commit 7e763a592b
2 changed files with 18 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ import ch.psi.pshell.swing.MotorPanel;
import ch.psi.pshell.ui.App;
import ch.psi.utils.swing.MonitoredPanel;
import ch.psi.pshell.ui.Panel;
import ch.psi.utils.State;
import ch.psi.utils.swing.SwingUtils;
import ch.psi.wsaf.ApplicationStateException;
import ch.psi.wsaf.Task;
@@ -57,6 +58,22 @@ public class TestingPanel extends Panel {
motor = (Motor) TestingPanel.this.getDevice("motor");
motorPanel.setDevice(motor);
}
protected void onStateChange(State state, State former) {
if ((state == State.Ready) && (former == State.Busy)) {
if ("test".equals(getController().getRunningScriptName())) {
try{
Object ret = eval("ret");
if (ret != null) {
SwingUtils.showMessage(getComponent(), "", ret.toString() + " - " + ret.getClass().getName());
}
} catch (Exception ex) {
SwingUtils.showException(getComponent(), ex);
}
}
}
}
public class NetbeansPluginPanel extends MonitoredPanel {