PopupShellpublic class PopupShell extends Object
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
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 void | layout()
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();
|
|