Closedown

This commit is contained in:
boccioli_m
2015-06-09 11:54:04 +02:00
parent 99093dca7e
commit ee5c8081b4
2 changed files with 15 additions and 15 deletions

View File

@@ -49,7 +49,7 @@
<Font name="Tahoma" size="15" style="0"/>
</Property>
<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, javax.swing.Icon.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"/>
<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;Description&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.lang.Object.class, javax.swing.Icon.class&#xa; };&#xa; boolean[] canEdit = new boolean [] {&#xa; true, 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"/>
@@ -61,8 +61,8 @@
</Properties>
<Events>
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jTable1MouseClicked"/>
<EventHandler event="inputMethodTextChanged" listener="java.awt.event.InputMethodListener" parameters="java.awt.event.InputMethodEvent" handler="jTable1InputMethodTextChanged"/>
<EventHandler event="caretPositionChanged" listener="java.awt.event.InputMethodListener" parameters="java.awt.event.InputMethodEvent" handler="jTable1CaretPositionChanged"/>
<EventHandler event="inputMethodTextChanged" listener="java.awt.event.InputMethodListener" parameters="java.awt.event.InputMethodEvent" handler="jTable1InputMethodTextChanged"/>
<EventHandler event="keyTyped" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="jTable1KeyTyped"/>
</Events>
</Component>

View File

@@ -101,9 +101,9 @@ public class TestingList extends Panel {
public void showResult(String deviceName, String testName, String res, String status){
int COL_TIME = 1;
int COL_RESULT = 4;
int COL_SUCCESS = 5;
int COL_ICON = 6;
int COL_RESULT = 5;
int COL_SUCCESS = 6;
int COL_ICON = 7;
int rowD=-1, colT=-1;
//search for device name in table
@@ -182,14 +182,14 @@ public class TestingList extends Panel {
},
new String [] {
"Select", "Time", "Device", "Test", "Result", "Status", ""
"Select", "Time", "Device", "Description", "Test", "Result", "Status", ""
}
) {
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, javax.swing.Icon.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, javax.swing.Icon.class
};
boolean[] canEdit = new boolean [] {
true, true, true, true, true, true, false
true, true, true, true, true, true, true, false
};
public Class getColumnClass(int columnIndex) {
@@ -279,8 +279,8 @@ public class TestingList extends Panel {
}
ImageIcon icon = new ImageIcon(getClass().getResource(iconSource));
jTable1.setValueAt(bSelected, row, 0);
jTable1.setValueAt(icon, row, 6);
jTable1.setValueAt(sStatus, row, 5);
jTable1.setValueAt(icon, row, 7);
jTable1.setValueAt(sStatus, row, 6);
}
}
@@ -321,19 +321,19 @@ public class TestingList extends Panel {
model.addRow(new Object[] {false, sDate, "MWD", "Display Test", "Sequence terminated", "Pending", icon});
model.addRow(new Object[] {false, sDate, "FIXL", "Lamp Test", "Failure", "Pending", icon});*/
jTable1.setModel(model);
jTable1.getColumnModel().getColumn(6).setMaxWidth(27);
jTable1.getColumnModel().getColumn(7).setMaxWidth(27);
jTable1.getColumnModel().getColumn(0).setMaxWidth(27);
updateStatus();
}
public void addToTable(String deviceName, String testName){
public void addToTable(String deviceName, String deviceDescription, String testName){
String sDate = getNow();
if(testName.equals("") || deviceName.equals("")) return;
ImageIcon icon = new ImageIcon(getClass().getResource("/icons/button_pause-16px.png"));
DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
model.addRow(new Object[] {false, sDate, deviceName, testName, "", "Pending", icon});
model.addRow(new Object[] {false, sDate, deviceName, deviceDescription, testName, "", "Pending", icon});
jTable1.setModel(model);
updateStatus();
@@ -353,7 +353,7 @@ public class TestingList extends Panel {
prop.load(is);
addToTable(prop.getProperty("name"), prop.getProperty("description"));
addToTable(prop.getProperty("name"), prop.getProperty("description"), prop.getProperty("tests"));
this.jTextField1.setText(prop.getProperty("name"));
}
@@ -375,7 +375,7 @@ public class TestingList extends Panel {
prop.load(is);
addToTable(prop.getProperty("name"), prop.getProperty("tests"));
addToTable(prop.getProperty("name"), prop.getProperty("description"), prop.getProperty("tests"));
this.jTextField1.append(prop.getProperty("name"));
this.jTextField1.append(prop.getProperty("description"));
this.jTextField1.append(prop.getProperty("tests"));