FileDocCategorySizeDatePackage
SWTNetworkSelection.javaAPI DocAzureus 3.0.3.47548Thu Feb 09 19:43:24 GMT 2006org.gudy.azureus2.ui.swt.networks

SWTNetworkSelection

public class SWTNetworkSelection extends Object implements org.gudy.azureus2.core3.util.AENetworkClassifierListener
author
parg

Fields Summary
Constructors Summary
public SWTNetworkSelection()

		AENetworkClassifier.addListener( this );
	
Methods Summary
public java.lang.String[]selectNetworks(java.lang.String description, java.lang.String[] tracker_networks)

		
		final Display	display = SWTThread.getInstance().getDisplay();
		
		if ( display.isDisposed()){
			
			return( null );
		}
		
		final AESemaphore	sem = new AESemaphore("NetworkClassifier");
		
		final classifierDialog[]	dialog = new classifierDialog[1];
		
		try{
			display.asyncExec(
				new AERunnable()
				{
					public void
					runSupport()
					{
						dialog[0] = new classifierDialog( sem, display, description, tracker_networks );
					}
				});
		}catch( Throwable e ){
			
			Debug.printStackTrace( e );
			
			return( null );
		}
		
		sem.reserve();
		
		return( dialog[0].getSelection());