Closedown
This commit is contained in:
@@ -118,9 +118,10 @@ public class TestingList extends Panel {
|
||||
TESTNAME (5),
|
||||
TESTPATH (6),
|
||||
TESTPARAMS (7),
|
||||
RESULT (8),
|
||||
STATUS (9),
|
||||
ICON (10);
|
||||
TESTDESCR (8),
|
||||
RESULT (9),
|
||||
STATUS (10),
|
||||
ICON (11);
|
||||
private int value;
|
||||
|
||||
private COL(int value) {
|
||||
@@ -254,14 +255,14 @@ public class TestingList extends Panel {
|
||||
|
||||
},
|
||||
new String [] {
|
||||
"Select", "Time", "Device Name", "Device Description", "Test Suite", "Test Name", "Test Peth", "Test Parameters", "Last Test Result", "Status", ""
|
||||
"Select", "Time", "Device Name", "Device Description", "Test Suite", "Test Name", "Test Peth", "Test Parameters", "Test Description", "Last 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, 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, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, javax.swing.Icon.class
|
||||
};
|
||||
boolean[] canEdit = new boolean [] {
|
||||
true, false, false, false, false, false, false, false, false, false, false
|
||||
true, false, false, false, false, false, false, false, false, false, false, false
|
||||
};
|
||||
|
||||
public Class getColumnClass(int columnIndex) {
|
||||
@@ -415,7 +416,6 @@ public class TestingList extends Panel {
|
||||
break;
|
||||
case 2:
|
||||
openDetails();
|
||||
SwingUtils.showMessage(this, "jBu","bo");
|
||||
break;
|
||||
}
|
||||
} catch (Exception ex){
|
||||
@@ -489,19 +489,15 @@ public class TestingList extends Panel {
|
||||
}
|
||||
|
||||
//open details of the selected test in a new panel
|
||||
private void openDetails() throws ClassNotFoundException, InstantiationException, IllegalAccessException{
|
||||
String sDeviceName;
|
||||
String sTestName;
|
||||
String sTestCaseName;
|
||||
String sDeviceDescription;
|
||||
String sLastResult;
|
||||
String sResultTime;
|
||||
private void openDetails() throws Exception{
|
||||
String sDeviceName, sTestName, sTestCaseName, sDeviceDescription, sTestDescription, sLastResult, sResultTime;
|
||||
HashMap mParameters = new HashMap();
|
||||
//pick details from the clicked row
|
||||
int row = jTable1.getSelectedRow();
|
||||
sDeviceName = jTable1.getValueAt(row, COL.DEVICENAME.ordinal()).toString();
|
||||
sTestName = jTable1.getValueAt(row, COL.TESTNAME.ordinal()).toString();
|
||||
sTestCaseName = jTable1.getValueAt(row, COL.TESTSUITE.ordinal()).toString();
|
||||
sTestDescription = jTable1.getValueAt(row, COL.TESTDESCR.ordinal()).toString();
|
||||
sDeviceDescription = jTable1.getValueAt(row, COL.DEVICEDESCR.ordinal()).toString();
|
||||
sLastResult = jTable1.getValueAt(row, COL.RESULT.ordinal()).toString();
|
||||
sResultTime = jTable1.getValueAt(row, COL.TIME.ordinal()).toString();
|
||||
@@ -510,25 +506,18 @@ public class TestingList extends Panel {
|
||||
HashMap details = new HashMap();
|
||||
details.put("deviceName", sDeviceName);
|
||||
details.put("deviceDescription", sDeviceDescription);
|
||||
details.put("testDescription", sTestDescription);
|
||||
details.put("testSuite", sTestCaseName);
|
||||
details.put("testName", sTestName);
|
||||
details.put("testResult", sLastResult);
|
||||
details.put("time", sResultTime);
|
||||
details.put("parameters", mParameters);
|
||||
//open details panel
|
||||
JDialog dlg = new JDialog(getView(), true);
|
||||
//dlg.setLayout(new BorderLayout());
|
||||
|
||||
System.out.println("A");
|
||||
//TestingListDetails detailsPanel = new TestingListDetails();
|
||||
Class testingListDetailsClass = getController().getClassByName("TestingListDetails");
|
||||
System.out.println(testingListDetailsClass);
|
||||
//JPanel detailsPanel = (JPanel)testingListDetailsClass.newInstance();
|
||||
JDialog dlg = new JDialog(getView(), "Test Details - " + sTestName , true);
|
||||
//create a class to visualise the details panel
|
||||
Class testingListDetailsClass = getController().getClassByName("TestingListDetails");
|
||||
JPanel detailsPanel = (JPanel) testingListDetailsClass.getConstructor(new Class[]{HashMap.class}).newInstance(new Object[]{details});
|
||||
|
||||
System.out.println("C");
|
||||
|
||||
|
||||
|
||||
dlg.getContentPane().add(detailsPanel);
|
||||
//dlg.add(new TestingListDetails());
|
||||
dlg.pack();
|
||||
@@ -712,7 +701,12 @@ public class TestingList extends Panel {
|
||||
}
|
||||
|
||||
//append test info to table
|
||||
public void addToTable(String deviceName, String deviceDescription, String testSuite, String testName, String testParams) {
|
||||
private void addToTable(String deviceName,
|
||||
String deviceDescription,
|
||||
String testSuite,
|
||||
String testName,
|
||||
String testParams,
|
||||
String testDescription) {
|
||||
String sDate = "";
|
||||
if (testName.equals("") || deviceName.equals("")) {
|
||||
return;
|
||||
@@ -720,7 +714,7 @@ public class TestingList extends Panel {
|
||||
ImageIcon icon = null;// new ImageIcon(getClass().getResource("/icons/button_pause-16px.png"));
|
||||
DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
|
||||
String testPath = FilenameUtils.separatorsToSystem(TESTS_TESTS_DEFAULT_DIR + testSuite + "/" + testName + "/" + testName + ".py");
|
||||
model.addRow(new Object[]{false, sDate, deviceName, deviceDescription, testSuite, testName, testPath, testParams, "", "Pending", icon});
|
||||
model.addRow(new Object[]{false, sDate, deviceName, deviceDescription, testSuite, testName, testPath, testParams, testDescription, "", "Pending", icon});
|
||||
jTable1.setModel(model);
|
||||
updateStatus();
|
||||
}
|
||||
@@ -775,7 +769,8 @@ public class TestingList extends Panel {
|
||||
propDevice.getProperty("description"),
|
||||
propDevice.getProperty("tests"),
|
||||
propTest.getProperty("name"),
|
||||
propTest.getProperty("parameters"));
|
||||
propTest.getProperty("parameters"),
|
||||
propTest.getProperty("description"));
|
||||
iCounter++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user