Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » what`s the function of the instance "invisibleShell"?
what`s the function of the instance "invisibleShell"? [message #463798] Tue, 15 November 2005 06:11 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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?
>
>
Previous Topic:ScrolledComposite scrol bar event not firing on Windows XP
Next Topic:highlight bar
Goto Forum:
  


Current Time: Tue Nov 04 08:08:37 EST 2025

Powered by FUDForum. Page generated in 0.04645 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top