Search in sources :

Example 1 with SwtParameter

use of com.biglybt.ui.swt.config.SwtParameter in project BiglyBT by BiglySoftware.

the class ChangeSelectionActionPerformer method performAction.

@Override
public void performAction() {
    boolean enabled = reverse_sense != selected;
    List<BooleanSwtParameter> listMoreTriggers = new ArrayList<>();
    for (SwtParameter param : params) {
        if (param == null || param.isDisposed()) {
            continue;
        }
        if (param instanceof BooleanSwtParameter) {
            BooleanSwtParameter bparam = (BooleanSwtParameter) param;
            listMoreTriggers.add(bparam);
        }
        param.setEnabled(enabled);
    }
    for (BooleanSwtParameter bparam : listMoreTriggers) {
        bparam.triggerActionPerformers();
    }
}
Also used : SwtParameter(com.biglybt.ui.swt.config.SwtParameter) BooleanSwtParameter(com.biglybt.ui.swt.config.BooleanSwtParameter) BooleanSwtParameter(com.biglybt.ui.swt.config.BooleanSwtParameter) ArrayList(java.util.ArrayList)

Aggregations

BooleanSwtParameter (com.biglybt.ui.swt.config.BooleanSwtParameter)1 SwtParameter (com.biglybt.ui.swt.config.SwtParameter)1 ArrayList (java.util.ArrayList)1