Closedown
This commit is contained in:
@@ -81,15 +81,25 @@
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jTextField1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="jTextField1"/>
|
||||
</Properties>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="First"/>
|
||||
<BorderConstraints direction="After"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextArea" name="jTextField1">
|
||||
<Properties>
|
||||
<Property name="columns" type="int" value="20"/>
|
||||
<Property name="rows" type="int" value="5"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
||||
@@ -39,6 +39,8 @@ import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Properties;
|
||||
import javax.swing.JFileChooser;
|
||||
|
||||
@@ -162,7 +164,8 @@ public class TestingList extends Panel {
|
||||
jScrollPane2 = new javax.swing.JScrollPane();
|
||||
jTable1 = new javax.swing.JTable();
|
||||
jCheckBox1 = new javax.swing.JCheckBox();
|
||||
jTextField1 = new javax.swing.JTextField();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
jTextField1 = new javax.swing.JTextArea();
|
||||
|
||||
setLayout(new java.awt.BorderLayout());
|
||||
|
||||
@@ -229,8 +232,11 @@ public class TestingList extends Panel {
|
||||
});
|
||||
add(jCheckBox1, java.awt.BorderLayout.LINE_START);
|
||||
|
||||
jTextField1.setText("jTextField1");
|
||||
add(jTextField1, java.awt.BorderLayout.PAGE_START);
|
||||
jTextField1.setColumns(20);
|
||||
jTextField1.setRows(5);
|
||||
jScrollPane1.setViewportView(jTextField1);
|
||||
|
||||
add(jScrollPane1, java.awt.BorderLayout.LINE_END);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
|
||||
@@ -300,9 +306,10 @@ public class TestingList extends Panel {
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton jButton1;
|
||||
private javax.swing.JCheckBox jCheckBox1;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JScrollPane jScrollPane2;
|
||||
private javax.swing.JTable jTable1;
|
||||
private javax.swing.JTextField jTextField1;
|
||||
private javax.swing.JTextArea jTextField1;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
//table management
|
||||
@@ -339,7 +346,7 @@ public class TestingList extends Panel {
|
||||
return dateFormat.format(date);
|
||||
}
|
||||
|
||||
public void loadTests() throws FileNotFoundException, IOException{
|
||||
public void loadTest() throws FileNotFoundException, IOException{
|
||||
Properties prop = new Properties();
|
||||
String fileName = new java.io.File( "." ).getCanonicalPath()+ "\\home\\script\\tests\\devices\\LS\\.config";
|
||||
this.jTextField1.setText(fileName);
|
||||
@@ -347,6 +354,25 @@ public class TestingList extends Panel {
|
||||
|
||||
prop.load(is);
|
||||
|
||||
addToTable(prop.getProperty("name"), prop.getProperty("description"));
|
||||
this.jTextField1.setText(prop.getProperty("name"));
|
||||
}
|
||||
|
||||
public void loadTests() throws FileNotFoundException, IOException{
|
||||
Properties prop = new Properties();
|
||||
String fileName = new java.io.File( "." ).getCanonicalPath()+ "\\home\\script\\tests\\devices\\";
|
||||
this.jTextField1.setText(fileName + "\n");
|
||||
Files.walk(Paths.get(fileName)).forEach(filePath -> {
|
||||
if (Files.isRegularFile(filePath)) {
|
||||
this.jTextField1.append(fileName);
|
||||
System.out.println(filePath);
|
||||
}
|
||||
});
|
||||
|
||||
InputStream is = new FileInputStream(fileName);
|
||||
|
||||
prop.load(is);
|
||||
|
||||
addToTable(prop.getProperty("name"), prop.getProperty("description"));
|
||||
this.jTextField1.setText(prop.getProperty("name"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user