| what`s the function of the instance "invisibleShell"? [message #463798] | 
Tue, 15 November 2005 06:11   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: zhangrui83.gmail.com 
 
i see a section of code in the OpenSource project named "RSSOwl". 
 
 ------------------------------------------------------------ ----- 
  ...... 
 
  Display display; 
  Shell invisibleShell; 
 
    /** Load GUI and display a Splashscreen while loading */ 
    private RSSOwlLoader() { 
 
    /** Apply application name to Display */ 
    Display.setAppName("RSSOwl " + UpdateManager.MAJOR_VERSION); 
 
    /** Create a new Display */ 
    display = new Display(); 
 
    /** Shell should not be visible in the taskbar */ 
    invisibleShell = new Shell(display, SWT.NONE); 
 
    /** Shell containing the splash */ 
    Shell shell = new Shell(invisibleShell, GlobalSettings.isWindows() ?  
SWT.TOOL : SWT.NONE); 
    shell.setLayout(LayoutShop.createFillLayout(0, 0)); 
 
    ...... 
 
 ------------------------------------------------------------ ------ 
why the coder must construct the instance "invisibleShell"? 
i want to write the code like this: 
 
 ------------------------------------------------------------ ----- 
  ...... 
 
  Display display; 
  Shell shell; 
 
    private RSSOwlLoader() { 
 
    /** Apply application name to Display */ 
    Display.setAppName("RSSOwl " + UpdateManager.MAJOR_VERSION); 
 
    /** Create a new Display */ 
    display = new Display(); 
 
    /** Shell containing the splash */ 
    Shell shell = new Shell(display, GlobalSettings.isWindows() ? SWT.TOOL :  
SWT.NONE); 
    shell.setLayout(LayoutShop.createFillLayout(0, 0)); 
 
    ...... 
 
 ------------------------------------------------------------ ------ 
shall i?
 |  
 |  
  | 
| Re: what`s the function of the instance "invisibleShell"? [message #464091 is a reply to message #463798] | 
Wed, 16 November 2005 13:55   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Looks like a hack to stop the splash screen from appearing in the task bar. 
 
"Granite" <zhangrui83@gmail.com> wrote in message 
news:dlcfjm$q3b$1@news.eclipse.org... 
> i see a section of code in the OpenSource project named "RSSOwl". 
> 
>  ------------------------------------------------------------ ----- 
>   ...... 
> 
>   Display display; 
>   Shell invisibleShell; 
> 
>     /** Load GUI and display a Splashscreen while loading */ 
>     private RSSOwlLoader() { 
> 
>     /** Apply application name to Display */ 
>     Display.setAppName("RSSOwl " + UpdateManager.MAJOR_VERSION); 
> 
>     /** Create a new Display */ 
>     display = new Display(); 
> 
>     /** Shell should not be visible in the taskbar */ 
>     invisibleShell = new Shell(display, SWT.NONE); 
> 
>     /** Shell containing the splash */ 
>     Shell shell = new Shell(invisibleShell, GlobalSettings.isWindows() ? 
> SWT.TOOL : SWT.NONE); 
>     shell.setLayout(LayoutShop.createFillLayout(0, 0)); 
> 
>     ...... 
> 
>  ------------------------------------------------------------ ------ 
> why the coder must construct the instance "invisibleShell"? 
> i want to write the code like this: 
> 
>  ------------------------------------------------------------ ----- 
>   ...... 
> 
>   Display display; 
>   Shell shell; 
> 
>     private RSSOwlLoader() { 
> 
>     /** Apply application name to Display */ 
>     Display.setAppName("RSSOwl " + UpdateManager.MAJOR_VERSION); 
> 
>     /** Create a new Display */ 
>     display = new Display(); 
> 
>     /** Shell containing the splash */ 
>     Shell shell = new Shell(display, GlobalSettings.isWindows() ? SWT.TOOL 
: 
> SWT.NONE); 
>     shell.setLayout(LayoutShop.createFillLayout(0, 0)); 
> 
>     ...... 
> 
>  ------------------------------------------------------------ ------ 
> shall i? 
> 
>
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.04645 seconds