FileDocCategorySizeDatePackage
ProgressPanel.javaAPI DocAzureus 3.0.3.43756Thu Sep 23 08:04:50 BST 2004org.gudy.azureus2.ui.swt.ipchecker

ProgressPanel

public class ProgressPanel extends AbstractWizardPanel implements org.gudy.azureus2.core3.ipchecker.extipchecker.ExternalIPCheckerServiceListener
author
Olivier

Fields Summary
org.eclipse.swt.widgets.Text
tasks
org.eclipse.swt.widgets.Display
display
Constructors Summary
public ProgressPanel(IpCheckerWizard wizard, IWizardPanel previousPanel)

    super(wizard, previousPanel);
  
Methods Summary
public voidcheckComplete(org.gudy.azureus2.core3.ipchecker.extipchecker.ExternalIPCheckerService service, java.lang.String ip)

    
    reportProgress(service,MessageText.getString("ipCheckerWizard.checkComplete") + ip);
    IpSetterCallBack callBack = ((IpCheckerWizard)wizard).callBack;
    if(callBack != null) {
      callBack.setIp(ip);
    }
    wizard.switchToClose();
  
public voidcheckFailed(org.gudy.azureus2.core3.ipchecker.extipchecker.ExternalIPCheckerService service, java.lang.String reason)

    reportProgress(service,MessageText.getString("ipCheckerWizard.checkFailed") + reason);
    wizard.switchToClose();
  
public voidfinish()

    ((IpCheckerWizard)wizard).selectedService.addListener(this);
    ((IpCheckerWizard)wizard).selectedService.initiateCheck(10000);
  
public voidreportProgress(org.gudy.azureus2.core3.ipchecker.extipchecker.ExternalIPCheckerService service, java.lang.String message)

    if(display == null || display.isDisposed())
      return;
    display.asyncExec(new AERunnable() {      
      public void runSupport() {
        if (tasks != null && !tasks.isDisposed()) {
          tasks.append(service.getName() + " : " + message + Text.DELIMITER);
        }
      }
    });
  
public voidshow()

    display = wizard.getDisplay();
    wizard.setTitle(MessageText.getString("ipCheckerWizard.progresstitle"));
    wizard.setCurrentInfo("");
    Composite rootPanel = wizard.getPanel();
    GridLayout layout = new GridLayout();
    layout.numColumns = 1;
    rootPanel.setLayout(layout);

    Composite panel = new Composite(rootPanel, SWT.NULL);
    GridData gridData = new GridData(GridData.VERTICAL_ALIGN_CENTER | GridData.FILL_HORIZONTAL);
    panel.setLayoutData(gridData);
    layout = new GridLayout();
    layout.numColumns = 1;
    panel.setLayout(layout);

    tasks = new Text(panel, SWT.BORDER | SWT.MULTI | SWT.READ_ONLY);
    tasks.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
    gridData = new GridData(GridData.FILL_BOTH);
    gridData.heightHint = 120;
    tasks.setLayoutData(gridData);