コード例 #1
0
  private void updateControls() {
    if (myCbReplaceWrite != null) {
      if (myCbReplaceAll.isSelected()) {
        myCbReplaceWrite.makeSelectable();
      } else {
        myCbReplaceWrite.makeUnselectable(true);
      }
    }

    if (myCbReplaceAll != null) {
      myTypeSelectorManager.setAllOccurrences(myCbReplaceAll.isSelected());
    } else {
      myTypeSelectorManager.setAllOccurrences(false);
    }

    if (myDeclareFinalIfAll && myCbReplaceAll != null && myCbReplaceAll.isSelected()) {
      myCbFinal.setEnabled(false);
      myCbFinal.setSelected(true);
    } else if (myCbReplaceWrite != null
        && myCbReplaceWrite.isEnabled()
        && myCbReplaceWrite.isSelected()) {
      myCbFinal.setEnabled(false);
      myCbFinal.setSelected(false);
    } else {
      myCbFinal.setEnabled(true);
      myCbFinal.setSelected(myCbFinalState);
    }
  }
 protected void updateControls(JCheckBox[] removeParamsCb) {
   if (myCbReplaceAllOccurences != null) {
     for (JCheckBox box : removeParamsCb) {
       if (box != null) {
         box.setEnabled(myCbReplaceAllOccurences.isSelected());
         box.setSelected(myCbReplaceAllOccurences.isSelected());
       }
     }
     if (myCbReplaceAllOccurences.isSelected()) {
       if (myCbDeleteLocalVariable != null) {
         myCbDeleteLocalVariable.makeSelectable();
       }
     } else {
       if (myCbDeleteLocalVariable != null) {
         myCbDeleteLocalVariable.makeUnselectable(false);
       }
     }
   }
 }