Closedown

This commit is contained in:
boccioli_m
2015-06-15 13:39:39 +02:00
parent 73fe9c6828
commit 83f315380f

View File

@@ -400,7 +400,7 @@ public class TestingList extends Panel {
private void jTable1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTable1MouseClicked
int colIndex = jTable1.getSelectedColumn();
if (colIndex == COL.CHECK.index()) updateStatus();
if (colIndex == COL.CHECK.ordinal()) updateStatus();
}//GEN-LAST:event_jTable1MouseClicked
private void jTable1KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTable1KeyTyped
@@ -430,7 +430,7 @@ public class TestingList extends Panel {
private void jTable1KeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTable1KeyReleased
int colIndex = jTable1.getSelectedColumn();
if (colIndex == COL.CHECK.index()) updateStatus();
if (colIndex == COL.CHECK.ordinal()) updateStatus();
}//GEN-LAST:event_jTable1KeyReleased
// Variables declaration - do not modify//GEN-BEGIN:variables
@@ -452,8 +452,8 @@ public class TestingList extends Panel {
int rowD = -1;
//search for device name in table
for (int row = 0; row <= jTable1.getRowCount() - 1; row++) {
if (deviceName.equals(jTable1.getValueAt(row, COL.DEVICENAME.index())) &&
testName.equals(jTable1.getValueAt(row, COL.TESTNAME.index()))) {
if (deviceName.equals(jTable1.getValueAt(row, COL.DEVICENAME.ordinal())) &&
testName.equals(jTable1.getValueAt(row, COL.TESTNAME.ordinal()))) {
rowD = row;
break;
}
@@ -474,7 +474,7 @@ public class TestingList extends Panel {
break;
}
jTable1.setValueAt(icon, rowD, COL.ICON.index());
jTable1.setValueAt(icon, rowD, COL.ICON.ordinal());
if (rowD >= 0) {
jTable1.setValueAt(getNow(), rowD, COL.TIME.ordinal());
@@ -490,9 +490,9 @@ public class TestingList extends Panel {
//search for device name in table
try{
for (int row = 0; row <= jTable1.getRowCount() - 1; row++) {
if (jTable1.getValueAt(row, COL.STATUS.index()).toString().equals(TestStatus.RUNNING.toString())) {
dsTestProperties[0] = jTable1.getValueAt(row, COL.DEVICENAME.index()).toString();
dsTestProperties[1] = jTable1.getValueAt(row, COL.TESTNAME.index()).toString();
if (jTable1.getValueAt(row, COL.STATUS.ordinal()).toString().equals(TestStatus.RUNNING.toString())) {
dsTestProperties[0] = jTable1.getValueAt(row, COL.DEVICENAME.ordinal()).toString();
dsTestProperties[1] = jTable1.getValueAt(row, COL.TESTNAME.ordinal()).toString();
break;
}
}
@@ -512,19 +512,19 @@ public class TestingList extends Panel {
int rowD = -1, colT = -1;
//search for device name in table
for (int row = 0; row <= jTable1.getRowCount() - 1; row++) {
if (deviceName.equals(jTable1.getValueAt(row, COL.DEVICENAME.index()))) {
if (deviceName.equals(jTable1.getValueAt(row, COL.DEVICENAME.ordinal()))) {
rowD = row;
break;
}
}
if (rowD >= 0) {
//search for test name in table
if (testName.equals(jTable1.getValueAt(rowD, COL.TESTNAME.index()))) {
colT = COL.TESTNAME.index();
if (testName.equals(jTable1.getValueAt(rowD, COL.TESTNAME.ordinal()))) {
colT = COL.TESTNAME.ordinal();
}
}
if (colT >= 0 && rowD >= 0) {
sStatus = jTable1.getValueAt(rowD, COL.STATUS.index()).toString();
sStatus = jTable1.getValueAt(rowD, COL.STATUS.ordinal()).toString();
}
return sStatus;
}
@@ -535,7 +535,7 @@ public class TestingList extends Panel {
boolean bSelected;
ImageIcon icon = null;
for (int row = 0; row <= jTable1.getRowCount() - 1; row++) {
bSelected = (boolean) jTable1.getValueAt(row, COL.CHECK.index());
bSelected = (boolean) jTable1.getValueAt(row, COL.CHECK.ordinal());
if (bSelected) {
sStatus = TestStatus.PENDING.toString();
icon = TestStatus.PENDING.Icon();
@@ -543,9 +543,9 @@ public class TestingList extends Panel {
sStatus = TestStatus.DISABLED.toString();
icon = TestStatus.DISABLED.Icon();
}
jTable1.setValueAt(bSelected, row, COL.CHECK.index());
jTable1.setValueAt(icon, row, COL.ICON.index());
jTable1.setValueAt(sStatus, row, COL.STATUS.index());
jTable1.setValueAt(bSelected, row, COL.CHECK.ordinal());
jTable1.setValueAt(icon, row, COL.ICON.ordinal());
jTable1.setValueAt(sStatus, row, COL.STATUS.ordinal());
}
}
@@ -559,12 +559,12 @@ public class TestingList extends Panel {
int row = position;
if (row <= jTable1.getRowCount()-1 ) {
for(row = position ; row <= jTable1.getRowCount()-1 ; row++){
bSelected = (boolean) jTable1.getValueAt(row, COL.CHECK.index());
bSelected = (boolean) jTable1.getValueAt(row, COL.CHECK.ordinal());
if(bSelected) break;
}
if (bSelected) {
sDeviceName = jTable1.getValueAt(row, COL.DEVICENAME.index()).toString();
sTestName = jTable1.getValueAt(row, COL.TESTNAME.index()).toString();
sDeviceName = jTable1.getValueAt(row, COL.DEVICENAME.ordinal()).toString();
sTestName = jTable1.getValueAt(row, COL.TESTNAME.ordinal()).toString();
showResult(sDeviceName, sTestName, "Test running", TestStatus.RUNNING.toString());
//launch the test
try{
@@ -591,10 +591,10 @@ public class TestingList extends Panel {
String sDate = getNow();
DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
jTable1.setModel(model);
jTable1.getColumnModel().getColumn(COL.ICON.index()).setMaxWidth(27);
jTable1.getColumnModel().getColumn(COL.CHECK.index()).setMaxWidth(27);
jTable1.getColumnModel().getColumn(COL.DEVICENAME.index()).setPreferredWidth(30);
jTable1.getColumnModel().getColumn(COL.STATUS.index()).setPreferredWidth(30);
jTable1.getColumnModel().getColumn(COL.ICON.ordinal()).setMaxWidth(27);
jTable1.getColumnModel().getColumn(COL.CHECK.ordinal()).setMaxWidth(27);
jTable1.getColumnModel().getColumn(COL.DEVICENAME.ordinal()).setPreferredWidth(30);
jTable1.getColumnModel().getColumn(COL.STATUS.ordinal()).setPreferredWidth(30);
jTable1.setAutoCreateRowSorter(true);
updateStatus();
}