Closedown
This commit is contained in:
@@ -6,7 +6,10 @@ import ch.psi.utils.swing.MonitoredPanel;
|
||||
import ch.psi.pshell.ui.Panel;
|
||||
import ch.psi.utils.swing.SwingUtils;
|
||||
import ch.psi.wsaf.Task;
|
||||
import com.ziclix.python.sql.DataHandler;
|
||||
import java.awt.Desktop;
|
||||
import java.awt.datatransfer.DataFlavor;
|
||||
import java.awt.datatransfer.Transferable;
|
||||
import java.io.File;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -24,7 +27,11 @@ import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.FileHandler;
|
||||
import java.util.logging.SimpleFormatter;
|
||||
import javax.activation.ActivationDataFlavor;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.TransferHandler;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
|
||||
public class TestingList extends Panel {
|
||||
@@ -64,7 +71,7 @@ public class TestingList extends Panel {
|
||||
//SwingUtils.showMessage(getComponent(), "", ret.toString() + " - " + ret.getClass().getName());
|
||||
iCurrentTestPos = testingList.showResult(deviceName.toString(), fileName, ret.toString(), sStatus);
|
||||
//start next test
|
||||
if(iCurrentTestPos>0)
|
||||
if(iCurrentTestPos>0 && testingList.isTestRunAllowed())
|
||||
{
|
||||
testingList.executeTest(iCurrentTestPos+1);
|
||||
}
|
||||
@@ -78,7 +85,7 @@ public class TestingList extends Panel {
|
||||
if(dsDeviceName[0] != ""){
|
||||
iCurrentTestPos = testingList.showResult(dsDeviceName[0], fileName, ret.toString(), sStatus);
|
||||
//start next test
|
||||
if(iCurrentTestPos>=0)
|
||||
if(iCurrentTestPos>=0 && testingList.isTestRunAllowed())
|
||||
{
|
||||
testingList.executeTest(iCurrentTestPos+1);
|
||||
}
|
||||
@@ -93,7 +100,7 @@ public class TestingList extends Panel {
|
||||
if(dsDeviceName[0] != ""){
|
||||
iCurrentTestPos = testingList.showResult(dsDeviceName[0], fileName, ret, sStatus);
|
||||
//start next test
|
||||
if(iCurrentTestPos>=0)
|
||||
if(iCurrentTestPos>=0 && testingList.isTestRunAllowed())
|
||||
{
|
||||
testingList.executeTest(iCurrentTestPos+1);
|
||||
}
|
||||
@@ -162,7 +169,7 @@ public class TestingList extends Panel {
|
||||
jButtonRun.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/button_play-64px.png"))); // NOI18N
|
||||
jButtonRun.setToolTipText("Run selected tests");
|
||||
jButtonRun.setMaximumSize(new java.awt.Dimension(33, 39));
|
||||
jButtonRun.setMinimumSize(new java.awt.Dimension(33, 39));
|
||||
jButtonRun.setMinimumSize(new java.awt.Dimension(90, 90));
|
||||
jButtonRun.setPreferredSize(new java.awt.Dimension(33, 39));
|
||||
jButtonRun.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
@@ -182,7 +189,7 @@ public class TestingList extends Panel {
|
||||
jButtonOpenLog.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/log-icon-64px.png"))); // NOI18N
|
||||
jButtonOpenLog.setToolTipText("Open current sessions Log");
|
||||
jButtonOpenLog.setMaximumSize(new java.awt.Dimension(80, 39));
|
||||
jButtonOpenLog.setMinimumSize(new java.awt.Dimension(80, 39));
|
||||
jButtonOpenLog.setMinimumSize(new java.awt.Dimension(90, 90));
|
||||
jButtonOpenLog.setPreferredSize(new java.awt.Dimension(90, 39));
|
||||
jButtonOpenLog.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
@@ -246,7 +253,16 @@ public class TestingList extends Panel {
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void jButtonRunActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonRunActionPerformed
|
||||
this.executeTest(0);
|
||||
if(this.jButtonRun.getToolTipText().equals("Run selected tests")){
|
||||
this.executeTest(0);
|
||||
this.jButtonRun.setToolTipText("Stop tests");
|
||||
jButtonRun.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/button_stop-64px.png")));
|
||||
}
|
||||
else{
|
||||
this.jButtonRun.setToolTipText("Run selected tests");
|
||||
jButtonRun.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/button_play-64px.png")));
|
||||
}
|
||||
|
||||
|
||||
}//GEN-LAST:event_jButtonRunActionPerformed
|
||||
|
||||
@@ -322,6 +338,9 @@ public class TestingList extends Panel {
|
||||
private javax.swing.JTable jTable1;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
public boolean isTestRunAllowed(){
|
||||
return this.jButtonRun.getToolTipText().equals("Stop tests");
|
||||
}
|
||||
|
||||
//show test result in table
|
||||
public int showResult(String deviceName, String testName, String res, String status) {
|
||||
@@ -554,5 +573,7 @@ public class TestingList extends Panel {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user