Closedown
This commit is contained in:
@@ -300,6 +300,9 @@ public class TestingList extends Panel {
|
||||
* initialise panel
|
||||
*/
|
||||
private void initialise(){
|
||||
|
||||
|
||||
// testing RPS packets
|
||||
System.out.println("msg:");
|
||||
int PORT1 = 0x8899; // this port
|
||||
String mode = "2,IQCOM,$BMA1,1,DIA";
|
||||
@@ -320,6 +323,7 @@ public class TestingList extends Panel {
|
||||
System.out.print(String.format("%02X ", msg[i]));
|
||||
}
|
||||
System.out.println("");
|
||||
// end of testing RPS packets
|
||||
|
||||
|
||||
|
||||
@@ -329,8 +333,8 @@ public class TestingList extends Panel {
|
||||
|
||||
|
||||
|
||||
|
||||
initComponents();
|
||||
initComponents();
|
||||
addIcons();
|
||||
initLogger();
|
||||
buildTable();
|
||||
|
||||
@@ -1085,6 +1089,15 @@ public class TestingList extends Panel {
|
||||
add(jPanelCustom, java.awt.BorderLayout.SOUTH);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void addIcons() {
|
||||
jButtonRun.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/play-circled-64-000000.png")));
|
||||
jButtonOptions.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/listing-option-32px.png")));
|
||||
jButtonSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/android-save-24-000000.png")));
|
||||
jButtonOpen.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/folder-open-36-000000.png")));
|
||||
jButtonMoveUp.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/chevron-up-24-000000.png")));
|
||||
jButtonMoveDown.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/chevron-down-24-000000.png")));
|
||||
}
|
||||
|
||||
private void jButtonRunActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonRunActionPerformed
|
||||
if (this.jButtonRun.getToolTipText().equals("Run enabled tests")) {
|
||||
Object pshellStatus;
|
||||
@@ -1263,14 +1276,14 @@ public class TestingList extends Panel {
|
||||
}//GEN-LAST:event_jButtonOptionsActionPerformed
|
||||
|
||||
private void jCheckBoxMenuShowSelectedTestsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxMenuShowSelectedTestsActionPerformed
|
||||
// TODO add your handling code here:
|
||||
|
||||
boolean bShow = jCheckBoxMenuShowSelectedTests.getState();
|
||||
showEnabledTestsOnly(bShow);
|
||||
jCheckBoxMenuShowSelectedTests1.setState(bShow);
|
||||
}//GEN-LAST:event_jCheckBoxMenuShowSelectedTestsActionPerformed
|
||||
|
||||
private void jMenuItemOpenLogActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemOpenLogActionPerformed
|
||||
// TODO add your handling code here:
|
||||
|
||||
String cmd;
|
||||
if (System.getProperty("os.name").toLowerCase().contains("windows")) {
|
||||
cmd = "notepad.exe " + TESTS_LOG_DEFAULT_DIR;
|
||||
@@ -1287,7 +1300,7 @@ public class TestingList extends Panel {
|
||||
}//GEN-LAST:event_jMenuItemOpenLogActionPerformed
|
||||
|
||||
private void jMenuItemReloadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemReloadActionPerformed
|
||||
// TODO add your handling code here:
|
||||
|
||||
reloadTests();
|
||||
try {
|
||||
cleanTests();
|
||||
@@ -1298,24 +1311,24 @@ public class TestingList extends Panel {
|
||||
}//GEN-LAST:event_jMenuItemReloadActionPerformed
|
||||
|
||||
private void jMenuItemNewTestActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemNewTestActionPerformed
|
||||
// TODO add your handling code here:
|
||||
|
||||
openNewTestEditor("Test");
|
||||
}//GEN-LAST:event_jMenuItemNewTestActionPerformed
|
||||
|
||||
private void jMenuItemNewDeviceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemNewDeviceActionPerformed
|
||||
// TODO add your handling code here:
|
||||
|
||||
openNewTestEditor("Device");
|
||||
}//GEN-LAST:event_jMenuItemNewDeviceActionPerformed
|
||||
|
||||
private void jCheckBoxMenuShowSelectedTests1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxMenuShowSelectedTests1ActionPerformed
|
||||
// TODO add your handling code here:
|
||||
|
||||
boolean bShow = jCheckBoxMenuShowSelectedTests1.getState();
|
||||
showEnabledTestsOnly(bShow);
|
||||
jCheckBoxMenuShowSelectedTests.setState(bShow);
|
||||
}//GEN-LAST:event_jCheckBoxMenuShowSelectedTests1ActionPerformed
|
||||
|
||||
private void jMenuItemReload1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemReload1ActionPerformed
|
||||
// TODO add your handling code here:
|
||||
|
||||
reloadTests();
|
||||
try {
|
||||
cleanTests();
|
||||
@@ -1327,7 +1340,7 @@ public class TestingList extends Panel {
|
||||
|
||||
private void jMenuItemShowDetailsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemShowDetailsActionPerformed
|
||||
try {
|
||||
// TODO add your handling code here:
|
||||
|
||||
openDetails();
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
|
||||
@@ -1335,27 +1348,27 @@ public class TestingList extends Panel {
|
||||
}//GEN-LAST:event_jMenuItemShowDetailsActionPerformed
|
||||
|
||||
private void jMenuItemSelectAllActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemSelectAllActionPerformed
|
||||
// TODO add your handling code here:
|
||||
|
||||
enableAll(true);
|
||||
}//GEN-LAST:event_jMenuItemSelectAllActionPerformed
|
||||
|
||||
private void jMenuItemSelectNoneActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemSelectNoneActionPerformed
|
||||
// TODO add your handling code here:
|
||||
|
||||
enableAll(false);
|
||||
}//GEN-LAST:event_jMenuItemSelectNoneActionPerformed
|
||||
|
||||
private void jMenuItemSelectSelectionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemSelectSelectionActionPerformed
|
||||
// TODO add your handling code here:
|
||||
|
||||
enableSelection(true);
|
||||
}//GEN-LAST:event_jMenuItemSelectSelectionActionPerformed
|
||||
|
||||
private void jMenuItemDeselectSelectionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemDeselectSelectionActionPerformed
|
||||
// TODO add your handling code here:
|
||||
|
||||
enableSelection(false);
|
||||
}//GEN-LAST:event_jMenuItemDeselectSelectionActionPerformed
|
||||
|
||||
private void jMenuItemEditScriptActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemEditScriptActionPerformed
|
||||
// TODO add your handling code here:
|
||||
|
||||
int rows[] = jTable1.getSelectedRows();
|
||||
for(int row=0 ; row<rows.length ; row++){
|
||||
try {
|
||||
@@ -1369,14 +1382,14 @@ public class TestingList extends Panel {
|
||||
}//GEN-LAST:event_jMenuItemEditScriptActionPerformed
|
||||
|
||||
private void jMenuItemRunSingleTestActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemRunSingleTestActionPerformed
|
||||
// TODO add your handling code here:
|
||||
|
||||
enableAll(false);
|
||||
enableSelection(true);
|
||||
jButtonRunActionPerformed( evt);
|
||||
}//GEN-LAST:event_jMenuItemRunSingleTestActionPerformed
|
||||
|
||||
private void jMenuLoadCustomPanelMenuSelected(javax.swing.event.MenuEvent evt) {//GEN-FIRST:event_jMenuLoadCustomPanelMenuSelected
|
||||
// TODO add your handling code here:
|
||||
|
||||
List<String> menuList = getCustomPanels();
|
||||
jMenuLoadCustomPanel.removeAll();
|
||||
for(int u = 0; u < menuList.size(); u++){
|
||||
@@ -1409,7 +1422,7 @@ public class TestingList extends Panel {
|
||||
}//GEN-LAST:event_jMenuItemCustomCloseActionPerformed
|
||||
|
||||
private void jMenuItemDeselectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemDeselectActionPerformed
|
||||
// TODO add your handling code here:
|
||||
|
||||
this.jTable1.clearSelection();
|
||||
}//GEN-LAST:event_jMenuItemDeselectActionPerformed
|
||||
|
||||
@@ -1974,7 +1987,6 @@ public class TestingList extends Panel {
|
||||
String sDeviceName = jTable1.getValueAt(row, COL.DEVICENAME.ordinal()).toString();
|
||||
String sDevicePath = jTable1.getValueAt(row, COL.DEVICEPATH.ordinal()).toString().replace("\\", File.separator);
|
||||
String sTestName = jTable1.getValueAt(row, COL.TESTNAME.ordinal()).toString();
|
||||
String sTestCaseName = jTable1.getValueAt(row, COL.TESTSUITE.ordinal()).toString();
|
||||
String sTestPath = jTable1.getValueAt(row, COL.TESTPATH.ordinal()).toString().replace("\\", File.separator);
|
||||
// HashMap mParameters = buildParametersMap(String.valueOf(jTable1.getValueAt(row, COL.TESTPARAMS.ordinal())));
|
||||
//get the parameters directly frm he config file
|
||||
@@ -1997,10 +2009,10 @@ public class TestingList extends Panel {
|
||||
*
|
||||
* @param sParameters string coming from HashMap conaining the list of
|
||||
* parameters to be passed to the test script. Example:
|
||||
* {repeatTimes={description=Repeat N times, value=1},
|
||||
* midPoint={description=Middle point A, value=41.0},
|
||||
* spanFromMidPoint={description=B steps around middle point A,
|
||||
* value=2.0}}
|
||||
* {repeatTimes={description="Repeat N times", value="1"},
|
||||
* midPoint={description="Middle point A", value="41.0"},
|
||||
* spanFromMidPoint={description="B steps around middle point A",
|
||||
* value="2.0"}}
|
||||
* @return string of dictionary in python syntax. This can be passed to
|
||||
* the python test script. Example of output:
|
||||
* {'repeatTimes':{'description':'Repeat N
|
||||
@@ -2046,7 +2058,6 @@ public class TestingList extends Panel {
|
||||
int iRet = -1;
|
||||
HashMap args2 = new HashMap(); //this is the global map that will contain one map per test.
|
||||
HashMap testArgs; //this is the map for a test.
|
||||
RunTest runTest;
|
||||
String sTestName = "", sDeviceName = "", sTestPath = "", sTestID = ""; //sTestID is the compination of device name + test path
|
||||
for (int row : rowsToExecute) {
|
||||
//System.out.println(String.valueOf(row) + "\t" + sDeviceName + "\t" + sTestName + "\t" + sTestCaseName + "\t" + String.valueOf(rowsToExecute.length));
|
||||
@@ -2209,11 +2220,20 @@ public class TestingList extends Panel {
|
||||
DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
|
||||
renderer.setToolTipText("Click for options");
|
||||
jTable1.getColumnModel().getColumn(COL.STARTSEQUENCE.ordinal()).setCellRenderer(renderer);
|
||||
jTable1.getColumnModel().getColumn(COL.STARTSEQUENCE.ordinal()).setPreferredWidth(30);
|
||||
jTable1.getColumnModel().getColumn(COL.STARTSEQUENCE.ordinal()).setPreferredWidth(130);
|
||||
jTable1.getColumnModel().getColumn(COL.STARTSEQUENCE.ordinal()).setMaxWidth(130);
|
||||
jTable1.getColumnModel().getColumn(COL.ICON.ordinal()).setMaxWidth(27);
|
||||
jTable1.getColumnModel().getColumn(COL.CHECK.ordinal()).setMaxWidth(27);
|
||||
jTable1.getColumnModel().getColumn(COL.DEVICENAME.ordinal()).setPreferredWidth(30);
|
||||
jTable1.getColumnModel().getColumn(COL.STATUS.ordinal()).setPreferredWidth(20);
|
||||
jTable1.getColumnModel().getColumn(COL.DEVICENAME.ordinal()).setPreferredWidth(200);
|
||||
jTable1.getColumnModel().getColumn(COL.DEVICENAME.ordinal()).setMaxWidth(200);
|
||||
jTable1.getColumnModel().getColumn(COL.TESTNAME.ordinal()).setPreferredWidth(200);
|
||||
jTable1.getColumnModel().getColumn(COL.TESTNAME.ordinal()).setMaxWidth(200);
|
||||
jTable1.getColumnModel().getColumn(COL.TESTSUITE.ordinal()).setPreferredWidth(200);
|
||||
jTable1.getColumnModel().getColumn(COL.TESTSUITE.ordinal()).setMaxWidth(200);
|
||||
jTable1.getColumnModel().getColumn(COL.STATUS.ordinal()).setPreferredWidth(90);
|
||||
jTable1.getColumnModel().getColumn(COL.STATUS.ordinal()).setMaxWidth(90);
|
||||
jTable1.getColumnModel().getColumn(COL.TIME.ordinal()).setPreferredWidth(200);
|
||||
jTable1.getColumnModel().getColumn(COL.TIME.ordinal()).setMaxWidth(200);
|
||||
hideColumn(COL.DEVICEDESCR);
|
||||
hideColumn(COL.DEVICEPATH);
|
||||
hideColumn(COL.TESTPATH);
|
||||
|
||||
Reference in New Issue
Block a user