Starting a RCP app maximized [message #400300] |
Wed, 15 December 2004 20:12 |
Eclipse User |
|
|
|
Originally posted by: parwizr.msoft.com
Hi,
I'm searching around for this and would like to find a way to start the app
maximized right from the start.
I do use the following code
configurer.getWindow().getShell().setMaximized( true );
in postWindowOpen(...) in my WorkbenchAdvisor but this is not smooth because
the application first shows up with the default size and then maximizes so
it's awkward. I want to have the app show up in one shot and be maximized
|
|
|
Re: Starting a RCP app maximized [message #400345 is a reply to message #400300] |
Thu, 16 December 2004 10:37 |
Eclipse User |
|
|
|
Originally posted by: josh.foo.bar.com
Have you tried putting the code in preWindowOpen() ?
This should maximise the window before it is shown on the screen.
Regards,
Josh
Parwiz wrote:
> Hi,
> I'm searching around for this and would like to find a way to start the app
> maximized right from the start.
> I do use the following code
>
> configurer.getWindow().getShell().setMaximized( true );
>
> in postWindowOpen(...) in my WorkbenchAdvisor but this is not smooth because
> the application first shows up with the default size and then maximizes so
> it's awkward. I want to have the app show up in one shot and be maximized
>
>
|
|
|
Re: Starting a RCP app maximized [message #400351 is a reply to message #400345] |
Thu, 16 December 2004 17:59 |
Eclipse User |
|
|
|
Originally posted by: parwizr.msoft.com
Yes I did however the window is not yet created so to do
getWindow().getShell().setMaximized( true ); results in a
NullPointerException
Any other ideas? :-)
"Josh Price" <josh@foo.bar.com> wrote in message
news:cpropg$vsc$1@www.eclipse.org...
> Have you tried putting the code in preWindowOpen() ?
>
> This should maximise the window before it is shown on the screen.
>
> Regards,
> Josh
>
> Parwiz wrote:
>> Hi,
>> I'm searching around for this and would like to find a way to start the
>> app maximized right from the start.
>> I do use the following code
>>
>> configurer.getWindow().getShell().setMaximized( true );
>>
>> in postWindowOpen(...) in my WorkbenchAdvisor but this is not smooth
>> because the application first shows up with the default size and then
>> maximizes so it's awkward. I want to have the app show up in one shot and
>> be maximized
|
|
|
|
|
|
|
Re: Starting a RCP app maximized [message #987375 is a reply to message #987358] |
Mon, 26 November 2012 10:54 |
|
In order to maximize the main window of an Eclipse RCP application at startup (full screen) must be in the class ApplicationWorkbenchWindowAdvisor which extends WorkbenchWindowAdvisor override the method createWindowContents.
Like following :
public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
.
.
.
@ Override
public void createWindowContents( Shell shell ) {
super.createWindow contents ( shell ) ;
shell.setMaximized ( true ) ;
}
}
[Updated on: Mon, 26 November 2012 10:55] Report message to a moderator
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04935 seconds