Set the scan that will be shown in this dialog.

@param scan the active scan, might be {@code null}.
195584
public void setActiveScan(ActiveScan scan) {
        this.scan = scan;

        if (scan == null) {
            return;
        }
        getHostSelect().removeAll();
        for (HostProcess hp : scan.getHostProcesses()) {
        	getHostSelect().addItem(hp.getHostAndPort());
        }

        Thread thread = new Thread() {
            @Override
            public void run() {
                while (!stopThread) {
                	SwingUtilities.invokeLater(new Runnable(){
						@Override
						public void run() {
							updateProgress();
						}});
                    
                    try {
                        sleep(200);
                        
                    } catch (InterruptedException e) {
                        // Ignore
                    }
                }
            }
        };
        
        thread.start();
    }
1244224
private void next() throws ScanException {
        token = scanner.next();
        while (token == Token.WS) {
            token = scanner.next();
        }
        text = scanner.text();
    }
673002
@Override
	public void setFocused(boolean focused)
	{
		if (!isEnabled() || !isVisible())
			return;

		if (!this.focused)
			selectAllOnRelease = true;

		super.setFocused(focused);
	}
908361
public void setMethod(String method) {
	method = method.toLowerCase();
	if (method.equals("loop")) this.method = MODE_LOOP;
	else if (method.equals("exittag")) this.method = MODE_EXIT_TAG;
	else if (method.equals("exittemplate")) this.method = MODE_EXIT_TEMPLATE;
    }
175214
public void setSelect(final String select) {
    if (null == select) {
      this.select = null;
    } else {
      if (Strings.contains(select.toLowerCase(), "select")) {
        this.select = select;
      } else {
        this.select = "select " + select;
      }
    }
  }
1357477
public void setFragment(java.lang.String fragment) {
        getStateHelper().put(PropertyKeys.fragment, fragment);
    }
961652
public final void setDialog(@NonNull final MaterialDialog dialog) {
        Condition.INSTANCE.ensureNotNull(dialog, "The dialog may not be null");
        this.dialog = dialog;
    }
1050374
public static void setSizeOfScanningRectangleInPx(Intent intent, int width, int height) {
    intent.putExtra(Intents.Scan.WIDTH, width);
    intent.putExtra(Intents.Scan.HEIGHT, height);
  }
506415
public void setFocused(boolean focused)
	{
		if (!isEnabled())
			return;

		boolean flag = this.focused != focused;
		flag |= MalisisGui.setFocusedComponent(this, focused);
		if (!flag)
			return;

		this.focused = focused;
		fireEvent(new FocusStateChange<>(this, focused));
	}
781675
@Override
    public void set(IQueryAtomContainer source, IAtomContainer target) {
        this.source = source;
        this.target = target;
    }
329908
@Override
    public <O> void set(String key, O value) {
        set(key,value,null,false);
    }
949639
public void setSetup(java.util.Collection<String> setup) {
        if (setup == null) {
            this.setup = null;
            return;
        }

        this.setup = new com.amazonaws.internal.SdkInternalList<String>(setup);
    }
1136963
public static void setCurrent(@Nullable String reason)
    {
        if (reason != null)
        {
            if (currentReason == null)
                currentReason = new ThreadLocal<>();
            currentReason.set(reason);
        }
        else if (currentReason != null)
        {
            currentReason.remove();
        }
    }
198068
private void cancelScan() {
        if (rescanIncompleteTask != null) {
            rescanIncompleteTask.cancel(true);
            rescanIncompleteTask = null;
        }
        if (rescanUndeployTask != null) {
            rescanUndeployTask.cancel(true);
            rescanUndeployTask = null;
        }
        if (scanTask != null) {
            scanTask.cancel(true);
            scanTask = null;
        }
    }
573314
public void setForm(AbstractForm form)
    {
        this.form = form;
        if(getId() == null) {
            setId(form.getId());
        }
    }
1038806
@Override
    void setScanResult(final ScanResult scanResult) {
        super.setScanResult(scanResult);
        if (typeArguments != null) {
            for (final TypeArgument typeArgument : typeArguments) {
                typeArgument.setScanResult(scanResult);
            }
        }
        if (suffixTypeArguments != null) {
            for (final List<TypeArgument> list : suffixTypeArguments) {
                for (final TypeArgument typeArgument : list) {
                    typeArgument.setScanResult(scanResult);
                }
            }
        }
    }
1304723
public void setQuery( String query )
    {
        _parameters = null;

        if ( query == null || query.length() == 0 ) { return; }

        for ( StringTokenizer tok = new StringTokenizer( query, "&" ); tok.hasMoreElements(); )
        {
            String queryItem = tok.nextToken();

            if ( queryItem.startsWith( "amp;" ) )
            {
                queryItem = queryItem.substring( 4 );
            }

            int eq = queryItem.indexOf( '=' );
            if ( eq != -1 )
            {
                addParameter( queryItem.substring( 0, eq ) , queryItem.substring( eq + 1 ), true );
            }
            else
            {
                addParameter( queryItem, null, true );
            }
        }
    }