Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Bring up a window on application startup after main window is shown
Bring up a window on application startup after main window is shown [message #324572] Sun, 27 January 2008 13:03 Go to next message
Eclipse UserFriend
Hi Folks,

I'm wondering how I can bring up a modal window (for example, a welcome message) after my main ApplicationWindow is shown? I'm using JFace but am also interested how you'd do it in SWT.

I managed to get something working by overriding the open() method on my ApplicationWindow and doing something like this...
	@Override
	public int open() {
		int result = super.open();
		MessageDialog.openInformation(getShell(), "Welcome", "Hello");
		return result;
	}

but the main window appears above this welcome dialong. I'm wondering if it'd be better to use some child window but I havn't read that chapter yet!

Cheers for any tips,
Toby
Re: Bring up a window on application startup after main window is shown [message #324584 is a reply to message #324572] Mon, 28 January 2008 03:38 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

in my RCP-App it works like this:
in ApplicationWorkbenchWindowAdvisor:

@Override
public void postWindowOpen() {
MessageDialog.openInformation(
getWindowConfigurer().getWindow().getShell(), "Info", "hello");
}

hth,
Manuel


Toby Weston wrote:

> Hi Folks,
>
> I'm wondering how I can bring up a modal window (for example, a
> welcome message) after my main ApplicationWindow is shown? I'm using
> JFace but am also interested how you'd do it in SWT.
>
> I managed to get something working by overriding the open() method on
> my ApplicationWindow and doing something like this...
> 	@Override
> 	public int open() {
> 		int result = super.open();
> 		MessageDialog.openInformation(getShell(), "Welcome", "Hello");
> 		return result;
> 	}
> 

> but the main window appears above this welcome dialong. I'm wondering
> if it'd be better to use some child window but I havn't read that
> chapter yet!
>
> Cheers for any tips,
> Toby



--
Re: Bring up a window on application startup after main window is shown [message #324596 is a reply to message #324584] Mon, 28 January 2008 12:32 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the post, whats the ApplicationWorkbenchWindowAdvisor? I can't find that or say WindowsAdvisor in the JFace libs...
Re: Bring up a window on application startup after main window isshown [message #324618 is a reply to message #324596] Tue, 29 January 2008 07:23 Go to previous message
Eclipse UserFriend
It's an RCP-thing, so if you do a normal Java-app using JFace
you don't have it.
In an RCP-App it's a class you get generated into the top package.

Toby Weston wrote:

> Thanks for the post, whats the ApplicationWorkbenchWindowAdvisor? I
> can't find that or say WindowsAdvisor in the JFace libs...



--
Previous Topic:detect if eclipse is ruinning on vista
Next Topic:3.4M5
Goto Forum:
  


Current Time: Fri Sep 19 01:37:02 EDT 2025

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

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

Back to the top