FileDocCategorySizeDatePackage
PopupShell.javaAPI DocAzureus 3.0.3.42535Sat Jun 02 14:41:08 BST 2007org.gudy.azureus2.ui.swt.shells

PopupShell

public class PopupShell extends Object
author
Olivier Chalouhi

Fields Summary
protected org.eclipse.swt.widgets.Shell
shell
public static final String
IMG_INFORMATION
Constructors Summary
public PopupShell(org.eclipse.swt.widgets.Display display)
Constructs an ON_TOP popup

param
display

  
            
     
    this(display,SWT.ON_TOP);
  
public PopupShell(org.eclipse.swt.widgets.Display display, int type)

 
    
    if ( display.isDisposed()){          
      return;
    }
    
    shell = new Shell(display,type);            
    
    shell.setSize(250,150);
    if(! Constants.isOSX) {
      shell.setImage(ImageRepository.getImage("azureus"));
    }
    
    FormLayout layout = new FormLayout();
    layout.marginHeight = 0;
    layout.marginWidth= 0;
    try {
      layout.spacing = 0;
    } catch (NoSuchFieldError e) {
      /* Ignore for Pre 3.0 SWT.. */
    } catch (Throwable e) {
    	Debug.printStackTrace( e );
    }
    
    shell.setLayout(layout);
  
Methods Summary
protected voidlayout()

    Label label = new Label(shell,SWT.NULL);
    label.setImage(ImageRepository.getImage("popup"));
    
    FormData formData = new FormData();
    formData.left = new FormAttachment(0,0);
    formData.top = new FormAttachment(0,0);
    
    label.setLayoutData(formData); 
    
    shell.layout();