Closedown

This commit is contained in:
boccioli_m
2015-06-10 09:48:39 +02:00
parent 0c2ec9a4a6
commit b7de52262d

View File

@@ -87,6 +87,8 @@ public class TestingList extends Panel {
private final int COL_RESULT = 6;
private final int COL_STATUS = 7;
private final int COL_ICON = 8;
private void initLogger() {
try {
@@ -151,9 +153,32 @@ public class TestingList extends Panel {
jTable1.setValueAt(getNow(), rowD, COL_TIME);
jTable1.setValueAt(res, rowD, COL_RESULT);
jTable1.setValueAt(status, rowD, COL_STATUS);
//jTable1.getCellEditor(rowD, COL_STATUS);
}
}
//returns the status of the specified test name for specified device name
public String getResult(String deviceName, String testName){
String sStatus = "";
int rowD = -1, colT = -1;
//search for device name in table
for (int row = 0; row <= jTable1.getRowCount() - 1; row++) {
if (deviceName.equals(jTable1.getValueAt(row, COL_DEVICENAME))) {
rowD = row;
break;
}
}
if (rowD >= 0) {
//search for test name in table
if (testName.equals(jTable1.getValueAt(rowD, COL_TESTNAME))) {
colT = COL_TESTNAME;
}
}
if (colT >= 0 && rowD >= 0) {
sStatus = jTable1.getValueAt(rowD, colT).toString();
}
return sStatus;
}
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
@@ -370,6 +395,9 @@ public class TestingList extends Panel {
try{
args.put("DEVICE", sDeviceName);
run(sTestName, args);
while(getResult(sDeviceName, sTestName) == "Running"){
Thread.sleep(1000);
}
} catch (Exception ex) {
SwingUtils.showMessage(this, "", ex.toString());
}