Closedown

This commit is contained in:
boccioli_m
2015-06-08 09:40:14 +02:00
parent 9f6f40fca6
commit 5d4528a0de
2 changed files with 18 additions and 49 deletions

View File

@@ -22,8 +22,7 @@
<EmptySpace min="-2" pref="244" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="jScrollPane1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<EmptySpace min="-2" pref="213" max="-2" attributes="0"/>
<Component id="deviceStatePanel1" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
@@ -43,17 +42,9 @@
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="42" max="-2" attributes="0"/>
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="jScrollPane1" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="28" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<Component id="deviceStatePanel1" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="90" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="-2" pref="28" max="-2" attributes="0"/>
<Component id="deviceStatePanel1" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="90" max="-2" attributes="0"/>
<Component id="jScrollPane2" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="18" max="32767" attributes="0"/>
</Group>
@@ -69,21 +60,6 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
</Events>
</Component>
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JTextArea" name="txtOutput">
<Properties>
<Property name="columns" type="int" value="20"/>
<Property name="rows" type="int" value="5"/>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JScrollPane" name="jScrollPane2">
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>

View File

@@ -85,7 +85,6 @@ public class TestingList extends Panel {
int COL_RESULT = 3;
int COL_SUCCESS = 4;
txtOutput.setText(res);
int rowD=-1, colT=-1;
//search for device name in table
for (int row = 0; row <= jTable1.getRowCount() - 1; row++) {
@@ -110,7 +109,15 @@ public class TestingList extends Panel {
}
if(colT>0 && rowD>0){
jTable1.setValueAt(res, rowD, COL_RESULT);
jTable1.setValueAt(success, rowD, COL_SUCCESS);
String sStatus;
if(success){
sStatus = "Success";
}
else{
sStatus = "Fail";
}
jTable1.setValueAt(sStatus, rowD, COL_SUCCESS);
}
}
@@ -118,8 +125,6 @@ public class TestingList extends Panel {
private void initComponents() {
jButton1 = new javax.swing.JButton();
jScrollPane1 = new javax.swing.JScrollPane();
txtOutput = new javax.swing.JTextArea();
jScrollPane2 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
deviceStatePanel1 = new ch.psi.pshell.swing.DeviceStatePanel();
@@ -131,10 +136,6 @@ public class TestingList extends Panel {
}
});
txtOutput.setColumns(20);
txtOutput.setRows(5);
jScrollPane1.setViewportView(txtOutput);
jTable1.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
@@ -158,8 +159,7 @@ public class TestingList extends Panel {
.addGap(244, 244, 244)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGap(213, 213, 213)
.addComponent(deviceStatePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jButton1)))
.addGroup(layout.createSequentialGroup()
@@ -172,14 +172,9 @@ public class TestingList extends Panel {
.addGroup(layout.createSequentialGroup()
.addGap(42, 42, 42)
.addComponent(jButton1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(28, 28, 28))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(deviceStatePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(90, 90, 90)))
.addGap(28, 28, 28)
.addComponent(deviceStatePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(90, 90, 90)
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(18, Short.MAX_VALUE))
);
@@ -207,10 +202,8 @@ public class TestingList extends Panel {
// Variables declaration - do not modify//GEN-BEGIN:variables
private ch.psi.pshell.swing.DeviceStatePanel deviceStatePanel1;
private javax.swing.JButton jButton1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JTable jTable1;
private javax.swing.JTextArea txtOutput;
// End of variables declaration//GEN-END:variables
//table with checkboxes
@@ -219,7 +212,7 @@ public class TestingList extends Panel {
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
Date date = new Date();
String sDate = dateFormat.format(date);
Object[] columnNames = {"Time", "Device", "Test", "Result", "Success"};
Object[] columnNames = {"Time", "Device", "Test", "Result", "Status"};
Object[][] data = {
{sDate, "LS", "Check Status", "No comm", false},
{sDate, "RS", "Calibrate", "Calibration done", true},