FileDocCategorySizeDatePackage
ChangeSelectionActionPerformer.javaAPI DocAzureus 3.0.3.43188Wed Jun 15 01:27:54 BST 2005org.gudy.azureus2.ui.swt.config

ChangeSelectionActionPerformer

public class ChangeSelectionActionPerformer extends Object implements IAdditionalActionPerformer
author
Olivier

Fields Summary
boolean
selected
boolean
reverse_sense
org.eclipse.swt.widgets.Control[]
controls
Constructors Summary
public ChangeSelectionActionPerformer(org.eclipse.swt.widgets.Control[] controls)

  
     
	this.controls = controls;
  
public ChangeSelectionActionPerformer(org.eclipse.swt.widgets.Control control)

		this.controls = new Control[]{ control };
  
public ChangeSelectionActionPerformer(Parameter p)

		this.controls = p.getControls();
  
public ChangeSelectionActionPerformer(Parameter p1, Parameter p2)

	  this( new Parameter[]{ p1, p2 });
  
public ChangeSelectionActionPerformer(Parameter[] params)


	  List	c = new ArrayList();
	  
	  for (int i=0;i<params.length;i++){
		  Control[] x = params[i].getControls();
		  
		  for (int j=0;j<x.length;j++){
			  c.add( x[j] );
		  }
	  }
	  
	  controls = new Control[c.size()];
	  
	  c.toArray( controls );
  
public ChangeSelectionActionPerformer(org.eclipse.swt.widgets.Control[] controls, boolean _reverse_sense)

  	this.controls = controls;
	reverse_sense = _reverse_sense;
  
Methods Summary
private voidcontrolsSetEnabled(org.eclipse.swt.widgets.Control[] controls, boolean bEnabled)

    for(int i = 0 ; i < controls.length ; i++) {
      if (controls[i] instanceof Composite)
        controlsSetEnabled(((Composite)controls[i]).getChildren(), bEnabled);
      controls[i].setEnabled(bEnabled);
    }
  
public voidperformAction()

    if(controls == null)
      return;
    controlsSetEnabled(controls, reverse_sense?!selected:selected);
  
public voidsetIntValue(int value)

    
  
public voidsetSelected(boolean selected)

    this.selected = selected;
  
public voidsetStringValue(java.lang.String value)