Closedown

This commit is contained in:
boccioli_m
2015-06-08 15:20:54 +02:00
parent 45cb5cbb9d
commit 2e94a4a632
2 changed files with 4 additions and 16 deletions

View File

@@ -46,16 +46,8 @@
<SubComponents>
<Component class="javax.swing.JTable" name="jTable1">
<Properties>
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
<Table columnCount="7" rowCount="0">
<Column editable="true" title="Select" type="java.lang.Boolean"/>
<Column editable="true" title="Time" type="java.lang.Object"/>
<Column editable="true" title="Device" type="java.lang.Object"/>
<Column editable="true" title="Test" type="java.lang.Object"/>
<Column editable="true" title="Result" type="java.lang.Object"/>
<Column editable="true" title="Status" type="java.lang.Object"/>
<Column editable="false" title="" type="java.lang.Object"/>
</Table>
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="new javax.swing.table.DefaultTableModel(&#xa; new Object [][] {&#xa;&#xa; },&#xa; new String [] {&#xa; &quot;Select&quot;, &quot;Time&quot;, &quot;Device&quot;, &quot;Test&quot;, &quot;Result&quot;, &quot;Status&quot;, &quot;&quot;&#xa; }&#xa;) {&#xa; Class[] types = new Class [] {&#xa; 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.awt.Image.class&#xa; };&#xa; boolean[] canEdit = new boolean [] {&#xa; true, true, true, true, true, true, false&#xa; };&#xa;&#xa; public Class getColumnClass(int columnIndex) {&#xa; return types [columnIndex];&#xa; }&#xa;&#xa; public boolean isCellEditable(int rowIndex, int columnIndex) {&#xa; return canEdit [columnIndex];&#xa; }&#xa;}" type="code"/>
</Property>
<Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor">
<TableColumnModel selectionModel="0">

View File

@@ -117,13 +117,10 @@ public class TestingList extends Panel {
ImageIcon icon = new ImageIcon(getClass().getResource("/icons/button_reload.png"));
jTable1.setValueAt(icon, rowD, COL_ICON);
if(colT>0 && rowD>0){
if(colT>0 && rowD>0){
jTable1.setValueAt(res, rowD, COL_RESULT);
jTable1.setValueAt(success, rowD, COL_SUCCESS);
jTable1.getCellEditor(rowD, COL_SUCCESS);
}
else{ //no test found in table. appen new one
DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
@@ -159,7 +156,7 @@ jTable1.setValueAt(icon, rowD, COL_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.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.awt.Image.class
};
boolean[] canEdit = new boolean [] {
true, true, true, true, true, true, false
@@ -213,7 +210,6 @@ jTable1.setValueAt(icon, rowD, COL_ICON);
public void buildTable(){
String sDate = getNow();
ImageIcon icon = new ImageIcon(getClass().getResource("/icons/button_play.png"));
//jTable1.getColumnModel().getColumn(6).setCellRenderer(new ImageRenderer());
DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
model.addRow(new Object[] {false, sDate, "LS", "Check Status", "No comm", "Pending", Color.BLUE});
model.addRow(new Object[] {true, sDate, "RS", "Calibrate", "Calibration done", "Pending", icon});