Closedown
This commit is contained in:
@@ -6,10 +6,7 @@ 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;
|
||||
@@ -27,19 +24,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 javafx.scene.control.SelectionMode;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.TransferHandler;
|
||||
import javax.swing.table.JTableHeader;
|
||||
import javax.swing.table.TableColumn;
|
||||
import javax.swing.table.TableColumnModel;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
|
||||
|
||||
|
||||
public class TestingList extends Panel {
|
||||
|
||||
NetbeansPluginPanel testingList;
|
||||
@@ -188,26 +177,26 @@ public class TestingList extends Panel {
|
||||
|
||||
@Override
|
||||
public final String toString() {
|
||||
String status = "";
|
||||
switch (this) {
|
||||
String status = "";
|
||||
switch (this) {
|
||||
case SUCCESS:
|
||||
status = "Success";
|
||||
break;
|
||||
break;
|
||||
case FAILURE:
|
||||
status = "Failure";
|
||||
break;
|
||||
break;
|
||||
case PENDING:
|
||||
status = "Pending";
|
||||
break;
|
||||
break;
|
||||
case DISABLED:
|
||||
status = "Disabled";
|
||||
break;
|
||||
break;
|
||||
case RUNNING:
|
||||
status = "Running";
|
||||
break;
|
||||
break;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
public ImageIcon Icon(){
|
||||
String iconFileName = this.IconFilename();
|
||||
@@ -378,6 +367,7 @@ public class TestingList extends Panel {
|
||||
private void setButtonToStart(){
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -416,12 +406,9 @@ public class TestingList extends Panel {
|
||||
private void jTable1KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTable1KeyTyped
|
||||
}//GEN-LAST:event_jTable1KeyTyped
|
||||
|
||||
//oopen the log file using one of th default OS text reades
|
||||
private void jButtonOpenLogActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOpenLogActionPerformed
|
||||
// TODO add your handling code here:
|
||||
/* jTable1.setValueAt("Running",0,7);
|
||||
String[] deviceName = testingList.getTestInProgress();
|
||||
SwingUtils.showMessage(this, "", deviceName[0]);
|
||||
*/ if (System.getProperty("os.name").toLowerCase().contains("windows")) {
|
||||
if (System.getProperty("os.name").toLowerCase().contains("windows")) {
|
||||
String cmd;
|
||||
cmd = "notepad.exe " + TESTS_LOG_DEFAULT_DIR;
|
||||
try {
|
||||
@@ -455,6 +442,7 @@ public class TestingList extends Panel {
|
||||
private javax.swing.JTable jTable1;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
//return status of run button. True = tests launching sequence is running
|
||||
public boolean isTestRunAllowed(){
|
||||
return this.jButtonRun.getToolTipText().equals("Stop tests");
|
||||
}
|
||||
@@ -489,14 +477,14 @@ public class TestingList extends Panel {
|
||||
jTable1.setValueAt(icon, rowD, COL.ICON.index());
|
||||
|
||||
if (rowD >= 0) {
|
||||
jTable1.setValueAt(getNow(), rowD, COL.TIME.index());
|
||||
jTable1.setValueAt(res, rowD, COL.RESULT.index());
|
||||
jTable1.setValueAt(status, rowD, COL.STATUS.index());
|
||||
jTable1.setValueAt(getNow(), rowD, COL.TIME.ordinal());
|
||||
jTable1.setValueAt(res, rowD, COL.RESULT.ordinal());
|
||||
jTable1.setValueAt(status, rowD, COL.STATUS.ordinal());
|
||||
}
|
||||
return rowD;
|
||||
}
|
||||
|
||||
//find the test currently in progress
|
||||
//find the test currently in progress
|
||||
public String[] getTestInProgress() {
|
||||
String[] dsTestProperties = {"",""};
|
||||
//search for device name in table
|
||||
|
||||
Reference in New Issue
Block a user