Closedown
This commit is contained in:
@@ -54,6 +54,7 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
|
||||
public static String TESTS_CONFIG_FILENAME = ".config";
|
||||
public static Path TESTS_TESTS_DEFAULT_DIR = Paths.get(".", "home", "script", "tests", "tests");
|
||||
public static Path TESTS_DEVICES_DEFAULT_DIR = Paths.get(".", "home", "script", "tests", "devices");
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
@@ -89,6 +90,7 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
jButtonMoreTest = new javax.swing.JButton();
|
||||
jLabel9 = new javax.swing.JLabel();
|
||||
jLabel10 = new javax.swing.JLabel();
|
||||
jButtonOkDev = new javax.swing.JButton();
|
||||
|
||||
jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
jLabel1.setText("Device name");
|
||||
@@ -196,8 +198,8 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
jEditorPaneHelp.setPreferredSize(new java.awt.Dimension(6, 400));
|
||||
jScrollPaneHtml.setViewportView(jEditorPaneHelp);
|
||||
|
||||
jButtonOk.setText("Save");
|
||||
jButtonOk.setToolTipText("Save parameters values");
|
||||
jButtonOk.setText("Save as default");
|
||||
jButtonOk.setToolTipText("Save parameters values as default (fo this test)");
|
||||
jButtonOk.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButtonOkActionPerformed(evt);
|
||||
@@ -229,6 +231,14 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
jLabel10.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
jLabel10.setText("(Value valid for all devices)");
|
||||
|
||||
jButtonOkDev.setText("Save for this device");
|
||||
jButtonOkDev.setToolTipText("Save parameters values for this specific device");
|
||||
jButtonOkDev.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButtonOkDevActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
@@ -266,7 +276,10 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
.addComponent(txtTestName, javax.swing.GroupLayout.PREFERRED_SIZE, 441, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jButtonMoreTest))))
|
||||
.addComponent(jButtonOk, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jButtonOkDev)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jButtonOk, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jScrollPaneHtml, javax.swing.GroupLayout.DEFAULT_SIZE, 272, Short.MAX_VALUE)
|
||||
.addContainerGap())
|
||||
@@ -316,7 +329,9 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
.addComponent(jLabel10)
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jButtonOk))
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jButtonOk)
|
||||
.addComponent(jButtonOkDev)))
|
||||
.addComponent(jScrollPaneHtml, javax.swing.GroupLayout.DEFAULT_SIZE, 559, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
@@ -483,8 +498,7 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
}
|
||||
|
||||
private void jButtonOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOkActionPerformed
|
||||
// TODO add your handling code here:
|
||||
Path testPath = Paths.get(TESTS_TESTS_DEFAULT_DIR.toString(), this.txtTestSuite.getText(), this.txtTestName.getText());
|
||||
Path testPath = Paths.get(TESTS_TESTS_DEFAULT_DIR.toString(), this.txtTestSuite.getText(), this.txtTestName.getText());
|
||||
updateTestConfig(testPath, this.txtTestName.getText(), this.txtTestSuite.getText(),getParametersFromTable());
|
||||
}//GEN-LAST:event_jButtonOkActionPerformed
|
||||
|
||||
@@ -524,11 +538,17 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
}
|
||||
}//GEN-LAST:event_jButtonMoreTestActionPerformed
|
||||
|
||||
private void jButtonOkDevActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOkDevActionPerformed
|
||||
Path devicePath = Paths.get(TESTS_DEVICES_DEFAULT_DIR.toString(), this.txtDeviceName.getText());
|
||||
updateTestConfig(devicePath, this.txtTestName.getText(), this.txtTestSuite.getText(),getParametersFromTable());
|
||||
}//GEN-LAST:event_jButtonOkDevActionPerformed
|
||||
|
||||
// <editor-fold defaultstate="collapsed" desc="Variables declaration">
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton jButtonMoreResult;
|
||||
private javax.swing.JButton jButtonMoreTest;
|
||||
private javax.swing.JButton jButtonOk;
|
||||
private javax.swing.JButton jButtonOkDev;
|
||||
private javax.swing.JEditorPane jEditorPaneHelp;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel10;
|
||||
|
||||
Reference in New Issue
Block a user