Esempio n. 1
0
 public String toString() {
   StringBuffer sb = new StringBuffer();
   sb.append("Phase: " + getPhaseAlias() + " SubPhase: " + getSubPhaseAlias());
   sb.append(
       "Leader: "
           + getLeader().getAlias()
           + " sel: "
           + getLeader().getButton().getSelection()
           + " enabled: "
           + getLeader().getButton().isEnabled()
           + "\n");
   if (getControls() != null) {
     Iterator it = getControls().iterator();
     while (it.hasNext()) {
       ISootOptionWidget next = (ISootOptionWidget) it.next();
       sb.append("control: " + next.getId() + "\n");
       if (next instanceof BooleanOptionWidget) {
         sb.append(
             "control is boolean and enable state: "
                 + ((BooleanOptionWidget) next).getButton().isEnabled()
                 + "\n");
       }
     }
   }
   return sb.toString();
 }
Esempio n. 2
0
 public void changeControlState(boolean enabled) {
   if (getControls() == null) return;
   Iterator it = getControls().iterator();
   while (it.hasNext()) {
     ISootOptionWidget control = (ISootOptionWidget) it.next();
     if (control.getControls() == null) continue;
     Iterator conIt = control.getControls().iterator();
     while (conIt.hasNext()) {
       Object obj = conIt.next();
       ((Control) obj).setEnabled(enabled);
     }
   }
 }