Closedown
This commit is contained in:
@@ -111,14 +111,22 @@ public class TestingList extends Panel {
|
||||
}
|
||||
}
|
||||
}
|
||||
ImageIcon icon = new ImageIcon("icons/button_reload.png");
|
||||
jTable1.setValueAt(icon, rowD, COL_ICON);
|
||||
|
||||
if(colT>0 && rowD>0){
|
||||
|
||||
jTable1.setValueAt(res, rowD, COL_RESULT);
|
||||
jTable1.setValueAt(success, rowD, COL_SUCCESS);
|
||||
jTable1.getCellEditor(rowD, COL_SUCCESS);
|
||||
ImageIcon icon = new ImageIcon("icons/button_reload.png");
|
||||
jTable1.setValueAt(icon, rowD, COL_ICON);
|
||||
|
||||
|
||||
}
|
||||
else{ //no test found in table. appen new one
|
||||
DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
|
||||
model.addRow(new Object[]{true, getNow(), deviceName, testName,res, success,icon });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
@@ -140,20 +148,20 @@ jTable1.setValueAt(icon, rowD, COL_ICON);
|
||||
|
||||
jTable1.setModel(new javax.swing.table.DefaultTableModel(
|
||||
new Object [][] {
|
||||
{null, null, null, null, null, null},
|
||||
{null, null, null, null, null, null},
|
||||
{null, null, null, null, null, null},
|
||||
{null, null, null, null, null, null}
|
||||
{null, null, null, null, null, null, null},
|
||||
{null, null, null, null, null, null, null},
|
||||
{null, null, null, null, null, null, null},
|
||||
{null, null, null, null, null, null, null}
|
||||
},
|
||||
new String [] {
|
||||
"Select", "Title 1", "Title 3", "Title 4", "Title 5", "Icon"
|
||||
"Select", "Title 1", "Title 3", "Title 4", "Title 5", "", "Icon"
|
||||
}
|
||||
) {
|
||||
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.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
|
||||
};
|
||||
boolean[] canEdit = new boolean [] {
|
||||
true, true, true, true, true, false
|
||||
true, true, true, true, true, true, false
|
||||
};
|
||||
|
||||
public Class getColumnClass(int columnIndex) {
|
||||
@@ -167,8 +175,9 @@ jTable1.setValueAt(icon, rowD, COL_ICON);
|
||||
jScrollPane2.setViewportView(jTable1);
|
||||
if (jTable1.getColumnModel().getColumnCount() > 0) {
|
||||
jTable1.getColumnModel().getColumn(0).setResizable(false);
|
||||
jTable1.getColumnModel().getColumn(5).setResizable(false);
|
||||
jTable1.getColumnModel().getColumn(5).setPreferredWidth(10);
|
||||
jTable1.getColumnModel().getColumn(0).setPreferredWidth(5);
|
||||
jTable1.getColumnModel().getColumn(6).setResizable(false);
|
||||
jTable1.getColumnModel().getColumn(6).setPreferredWidth(10);
|
||||
}
|
||||
|
||||
add(jScrollPane2, java.awt.BorderLayout.PAGE_END);
|
||||
@@ -202,9 +211,7 @@ jTable1.setValueAt(icon, rowD, COL_ICON);
|
||||
//table with checkboxes
|
||||
|
||||
public void buildTable(){
|
||||
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
||||
Date date = new Date();
|
||||
String sDate = dateFormat.format(date);
|
||||
String sDate = getNow();
|
||||
Object[] columnNames = {"Select", "Time", "Device", "Test", "Result", "Status", ""};
|
||||
ImageIcon icon = new ImageIcon("button_play.png");
|
||||
Object[][] data = {
|
||||
@@ -218,7 +225,13 @@ jTable1.setValueAt(icon, rowD, COL_ICON);
|
||||
//jTable1.setModel(model);
|
||||
}
|
||||
|
||||
|
||||
public String getNow(){
|
||||
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
||||
Date date = new Date();
|
||||
return dateFormat.format(date);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user