-----------------------------------------------------------------
...... 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)); ......------------------------------------------------------------------
为什么要建立一个invisibleShell呢,shell直接建立在display上不行么?
我在eclipse里试验了以下的代码,从暂时的结果看来,和上面的代码运行结果没有区别。
-----------------------------------------------------------------
...... 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)); ......------------------------------------------------------------------
我想作者应该有他的道理吧,请教大家一下,谢谢。
...... 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)); ......------------------------------------------------------------------
为什么要建立一个invisibleShell呢,shell直接建立在display上不行么?
我在eclipse里试验了以下的代码,从暂时的结果看来,和上面的代码运行结果没有区别。
-----------------------------------------------------------------
...... 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)); ......------------------------------------------------------------------
我想作者应该有他的道理吧,请教大家一下,谢谢。
又可以直接对shell进行一些操作
具体搜索一下还有哪里调用了invisibleShell