Closedown

This commit is contained in:
boccioli_m
2015-06-16 11:43:36 +02:00
parent dc26db4438
commit c3d57c6e00
2 changed files with 23 additions and 1 deletions

View File

@@ -2,10 +2,13 @@
* Copyright (c) 2014 Paul Scherrer Institute. All rights reserved.
*/
import ch.psi.pshell.core.Controller;
import ch.psi.utils.swing.MonitoredPanel;
import ch.psi.pshell.ui.Panel;
import ch.psi.utils.swing.SwingUtils;
import ch.psi.wsaf.ApplicationStateException;
import ch.psi.wsaf.Task;
import ch.psi.wsaf.TaskRunningException;
import java.awt.Desktop;
import java.io.File;
import java.text.DateFormat;
@@ -25,6 +28,7 @@ import java.util.Properties;
import java.util.logging.FileHandler;
import java.util.logging.SimpleFormatter;
import javafx.scene.control.SelectionMode;
import javax.script.ScriptException;
import javax.swing.JFileChooser;
import javax.swing.SwingUtilities;
import org.apache.commons.io.FilenameUtils;
@@ -357,10 +361,28 @@ public class TestingList extends Panel {
}
private void setButtonToStart(){
Object state = null;
try {
state = eval("state");
} catch (ApplicationStateException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (ScriptException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (Controller.ControllerStateException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (InterruptedException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (TaskRunningException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
}
if(state.toString().equals("Ready")){
this.jButtonRun.setToolTipText("Stop tests");
jButtonRun.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/button_stop-64px.png")));
this.jTable1.clearSelection();
this.jTable1.setEnabled(false);
}
}