This commit is contained in:
boccioli_m
2015-06-09 14:37:35 +02:00
parent 5210db8cb0
commit 24c0e963d5
2 changed files with 20 additions and 16 deletions

View File

@@ -95,8 +95,15 @@ public class TestingList extends Panel {
public class NetbeansPluginPanel extends MonitoredPanel {
Logger logger = Logger.getLogger("TestsLog");
String TESTS_DEFAULT_DIR = FilenameUtils.separatorsToSystem("/home/script/tests/production");
String LOG_DEFAULT_DIR = FilenameUtils.separatorsToSystem("\\home\\script\\tests\\log\\TestsLog.txt");
//these paths are converted to unix or win path according to host OS
private String TESTS_DEFAULT_DIR = FilenameUtils.separatorsToSystem("/home/script/tests/production");
private String LOG_DEFAULT_DIR = FilenameUtils.separatorsToSystem("/home/script/tests/log/TestsLog.txt");
//table1 columns indexes
private int COL_CHECK = 0;
private int COL_TIME = 1;
private int COL_RESULT = 6;
private int COL_SUCCESS = 7;
private int COL_ICON = 8;
private void initLogger(){
try {
@@ -123,10 +130,7 @@ public class TestingList extends Panel {
public void showResult(String deviceName, String testName, String res, String status){
int COL_TIME = 1;
int COL_RESULT = 5;
int COL_SUCCESS = 6;
int COL_ICON = 7;
int rowD=-1, colT=-1;
//search for device name in table
@@ -208,14 +212,14 @@ public class TestingList extends Panel {
},
new String [] {
"Select", "Time", "Device", "Description", "Test", "Result", "Status", ""
"Select", "Time", "Device", "Description", "Test Suite", "Test", "Result", "Status", ""
}
) {
Class[] types = new Class [] {
java.lang.Boolean.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, javax.swing.Icon.class
java.lang.Boolean.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, javax.swing.Icon.class
};
boolean[] canEdit = new boolean [] {
true, true, true, true, true, true, true, false
true, true, true, true, true, true, true, true, false
};
public Class getColumnClass(int columnIndex) {
@@ -309,9 +313,9 @@ public class TestingList extends Panel {
iconSource = "/icons/button_stop-16px.png";
}
ImageIcon icon = new ImageIcon(getClass().getResource(iconSource));
jTable1.setValueAt(bSelected, row, 0);
jTable1.setValueAt(icon, row, 7);
jTable1.setValueAt(sStatus, row, 6);
jTable1.setValueAt(bSelected, row, COL_CHECK);
jTable1.setValueAt(icon, row, COL_ICON);
jTable1.setValueAt(sStatus, row, COL_SUCCESS);
}
}
@@ -352,8 +356,8 @@ public class TestingList extends Panel {
model.addRow(new Object[] {false, sDate, "MWD", "Display Test", "Sequence terminated", "Pending", icon});
model.addRow(new Object[] {false, sDate, "FIXL", "Lamp Test", "Failure", "Pending", icon});*/
jTable1.setModel(model);
jTable1.getColumnModel().getColumn(7).setMaxWidth(27);
jTable1.getColumnModel().getColumn(0).setMaxWidth(27);
jTable1.getColumnModel().getColumn(COL_ICON).setMaxWidth(27);
jTable1.getColumnModel().getColumn(COL_CHECK).setMaxWidth(27);
updateStatus();
}
@@ -364,7 +368,7 @@ public class TestingList extends Panel {
ImageIcon icon = new ImageIcon(getClass().getResource("/icons/button_pause-16px.png"));
DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
model.addRow(new Object[] {false, sDate, deviceName, deviceDescription, testName, "", "Pending", icon});
model.addRow(new Object[] {false, sDate, deviceName, deviceDescription, testName, "", "", "Pending", icon});
jTable1.setModel(model);
updateStatus();