Closedown

This commit is contained in:
boccioli_m
2015-08-24 08:53:55 +02:00
parent 1cca22f140
commit d4bf2ef10f
2 changed files with 32 additions and 2 deletions

View File

@@ -52,6 +52,8 @@ import static org.python.bouncycastle.util.Arrays.append;
*/
public class TestingList extends Panel {
TableModel fullTable; //all tests are in this table model
TableModel partialTable; //only tests selected are in this table model
Task task = new Task() {
@Override
protected Object execute() throws Exception {
@@ -549,7 +551,16 @@ public class TestingList extends Panel {
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
try {
openListEditor();
//openListEditor();
if(jButton1.getText() == "+"){
showDeselectedTests(true);
jButton1.setText("-");
}
else{
showDeselectedTests(false);
jButton1.setText("+");
}
} catch (Exception ex) {
SwingUtils.showException(null, ex);
}
@@ -573,6 +584,25 @@ public class TestingList extends Panel {
// End of variables declaration//GEN-END:variables
//</editor-fold>
private void showDeselectedTests(boolean show){
jTable1.removeAll();
if(show){
buildTable();
}
else{
DefaultTableModel modelAll = (DefaultTableModel) jTable1.getModel();
DefaultTableModel modelOnlySelected = modelAll;
int rows = modelOnlySelected.getRowCount();
for(int row=0 ; row<rows ; row++) {
if(modelOnlySelected.getValueAt(row, COL.CHECK.ordinal()).toString()=="false"){
modelOnlySelected.removeRow(row);
rows--;
}
}
}
}
/**
* returns whether or not the tests can run (Run launched by the user)
*