Exemple #1
0
 public void setScheme(Subtree scheme) {
   this.scheme = scheme;
   cbList = new CheckBoxList();
   Vector<CQCheck> cqChecks = scheme.getCqChecks();
   checkBoxes = new JCheckBox[cqChecks.size()];
   for (int cq = 0; cq < cqChecks.size(); cq++) {
     CQCheck cqCheck = cqChecks.elementAt(cq);
     checkBoxes[cq] = new JCheckBox(cqCheck.getCqText());
     checkBoxes[cq].setSelected(cqCheck.isCqAnswered());
   }
   cbList.setListData(checkBoxes);
   cqScrollPane.setViewportView(cbList);
 }
Exemple #2
0
 private void okButtonActionPerformed(
     java.awt.event.ActionEvent evt) // GEN-FIRST:event_okButtonActionPerformed
     { // GEN-HEADEREND:event_okButtonActionPerformed
   Vector<CQCheck> cqChecks = scheme.getCqChecks();
   for (int cq = 0; cq < cqChecks.size(); cq++) {
     CQCheck cqCheck = cqChecks.elementAt(cq);
     if (checkBoxes[cq].isSelected()) {
       cqCheck.setCqAnswered(true);
     } else {
       cqCheck.setCqAnswered(false);
     }
   }
   okPressed = true;
   setVisible(false);
 } // GEN-LAST:event_okButtonActionPerformed