Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to listen for new shell creation?
How to listen for new shell creation? [message #460420] Thu, 25 August 2005 16:58 Go to next message
Scott Delap is currently offline Scott DelapFriend
Messages: 24
Registered: July 2009
Junior Member
I'm attempting to get the open source com.nightlabs.rcp.splash screen to
work in my application. I have noticed that that error dialogs seem to appear
under their splash screen if they are generated during startup. I'm guessing
this is due to Nighlabs using a JFrame. Ignoring the option of converting
their JFrame to a more appropriate SWT container ... is there a way to listen
for new Shell's as they are created so I can manually bring them to the front
above the JFrame.

Scott
Re: How to listen for new shell creation? [message #460442 is a reply to message #460420] Fri, 26 August 2005 15:31 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Not really. Are the error dialogs, Swing, SWT or C windows?

"Scott Delap" <scott@clientjava.com> wrote in message
news:ec2edb97217c758c77783811018df@news.eclipse.org...
> I'm attempting to get the open source com.nightlabs.rcp.splash screen to
> work in my application. I have noticed that that error dialogs seem to
appear
> under their splash screen if they are generated during startup. I'm
guessing
> this is due to Nighlabs using a JFrame. Ignoring the option of converting
> their JFrame to a more appropriate SWT container ... is there a way to
listen
> for new Shell's as they are created so I can manually bring them to the
front
> above the JFrame.
>
> Scott
>
>
Re: How to listen for new shell creation? [message #460444 is a reply to message #460442] Fri, 26 August 2005 15:51 Go to previous messageGo to next message
Scott Delap is currently offline Scott DelapFriend
Messages: 24
Registered: July 2009
Junior Member
Steve,

The error dialogs are SWT generated (things like workbench can't be opened
due to corruption or license not found message in a MessageDialog). I traced
into the Shell code and see that bringToTop() is called during open(). I
think the issue is that the splash screen supplied by Nightlabs is written
as a JFrame (should be AWT due to classloading but that is an optimization
for another day). I'm guessing the bringToTop() method isn't expecting non
SWT generated application windows. As an aside, I extracted the JPanel in
the splash screen and placed it in a Shell using the SWT_AWT bridge. Error
dialogs now correctly appear above it when generated. There are issue with
this implementation as well however. The Swing progress bar animation hangs
and the Shell does always appear above the native splash screen after the
sequence of Platform.endSplash() and shell.open() is called. I need to look
into the threading characteristics of the the splash screen implementation
to learn more about the problem.

> Not really. Are the error dialogs, Swing, SWT or C windows?
>
> "Scott Delap" <scott@clientjava.com> wrote in message
> news:ec2edb97217c758c77783811018df@news.eclipse.org...
>
>> I'm attempting to get the open source com.nightlabs.rcp.splash screen
>> to work in my application. I have noticed that that error dialogs
>> seem to
>>
> appear
>
>> under their splash screen if they are generated during startup. I'm
>>
> guessing
>
>> this is due to Nighlabs using a JFrame. Ignoring the option of
>> converting their JFrame to a more appropriate SWT container ... is
>> there a way to
>>
> listen
>
>> for new Shell's as they are created so I can manually bring them to
>> the
>>
> front
>
>> above the JFrame.
>>
>> Scott
>>
Re: How to listen for new shell creation? [message #460475 is a reply to message #460444] Mon, 29 August 2005 18:06 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
If you have multiple GUI threads (like what is happening when SWT and Swing
are running in the same process), then one thread is not allowed to steal
focus from another, just like multiple processes on the desktop. I would
have expected the SWT_AWT bridge to fail the same way but there might be
special rules when one window is embedded in another.

Let us know how you get on.

"Scott Delap" <scott@clientjava.com> wrote in message
news:ec2edb9721cf738c778434d6b2fcb@news.eclipse.org...
> Steve,
>
> The error dialogs are SWT generated (things like workbench can't be opened
> due to corruption or license not found message in a MessageDialog). I
traced
> into the Shell code and see that bringToTop() is called during open(). I
> think the issue is that the splash screen supplied by Nightlabs is written
> as a JFrame (should be AWT due to classloading but that is an optimization
> for another day). I'm guessing the bringToTop() method isn't expecting
non
> SWT generated application windows. As an aside, I extracted the JPanel in
> the splash screen and placed it in a Shell using the SWT_AWT bridge.
Error
> dialogs now correctly appear above it when generated. There are issue
with
> this implementation as well however. The Swing progress bar animation
hangs
> and the Shell does always appear above the native splash screen after the
> sequence of Platform.endSplash() and shell.open() is called. I need to
look
> into the threading characteristics of the the splash screen implementation
> to learn more about the problem.
>
> > Not really. Are the error dialogs, Swing, SWT or C windows?
> >
> > "Scott Delap" <scott@clientjava.com> wrote in message
> > news:ec2edb97217c758c77783811018df@news.eclipse.org...
> >
> >> I'm attempting to get the open source com.nightlabs.rcp.splash screen
> >> to work in my application. I have noticed that that error dialogs
> >> seem to
> >>
> > appear
> >
> >> under their splash screen if they are generated during startup. I'm
> >>
> > guessing
> >
> >> this is due to Nighlabs using a JFrame. Ignoring the option of
> >> converting their JFrame to a more appropriate SWT container ... is
> >> there a way to
> >>
> > listen
> >
> >> for new Shell's as they are created so I can manually bring them to
> >> the
> >>
> > front
> >
> >> above the JFrame.
> >>
> >> Scott
> >>
>
>
Previous Topic:Multiple Display instances questions...
Next Topic:Global exception handler?
Goto Forum:
  


Current Time: Wed Apr 14 09:25:16 GMT 2021

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

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

Back to the top