Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Starting a RCP app maximized
Starting a RCP app maximized [message #400300] Wed, 15 December 2004 20:12 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #400849 is a reply to message #400351] Tue, 21 December 2004 18:51 Go to previous messageGo to next message
Nick Edgar is currently offline Nick EdgarFriend
Messages: 439
Registered: July 2009
Senior Member
In preWindowOpen, the shell hasn't been created yet, so getShell()
returns null.
If you move this snippet to postWindowCreate, it should work.

Nick

Parwiz wrote:
> 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 #419183 is a reply to message #400849] Fri, 01 April 2005 14:02 Go to previous messageGo to next message
Phill Perryman is currently offline Phill PerrymanFriend
Messages: 214
Registered: July 2009
Senior Member
<br><font size=1 face="sans-serif">I have found if you add it to the createWindowContents method it opens directly full size, the method also provides the shell</font>
<br>
<br><font size=1 face="sans-serif">&nbsp;public void createWindowContents(IWorkbenchWindowConfigurer configurer, Shell shell) {</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; super.createWindowContents(configurer, shell);</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; shell.setMaximized(true);</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; }</font>
<br>
Re: Starting a RCP app maximized [message #987349 is a reply to message #400300] Mon, 26 November 2012 09:12 Go to previous messageGo to next message
Sandeep Yohans is currently offline Sandeep YohansFriend
Messages: 10
Registered: April 2012
Location: Nagpur, India
Junior Member
Hi,

Though all the answers posted here make the application start maximized but the working is not smooth. It flickers a little by first opening it in small size and the making it maximized.

So did anyone find the exact solution for this problem?
Re: Starting a RCP app maximized [message #987358 is a reply to message #987349] Mon, 26 November 2012 09:34 Go to previous messageGo to next message
Sandeep Yohans is currently offline Sandeep YohansFriend
Messages: 10
Registered: April 2012
Location: Nagpur, India
Junior Member
So the problem in the Original post remains as it is:-

Quote:
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 #987375 is a reply to message #987358] Mon, 26 November 2012 10:54 Go to previous messageGo to next message
Sumit Singh is currently offline Sumit SinghFriend
Messages: 141
Registered: October 2012
Location: Bangalore
Senior Member

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

Re: Starting a RCP app maximized [message #987853 is a reply to message #987375] Wed, 28 November 2012 11:50 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

In Eclipse 4 RCP you put the tag shellMaximized on the Window. Eclipse 4 Tags
Re: Starting a RCP app maximized [message #987859 is a reply to message #987375] Wed, 28 November 2012 12:23 Go to previous messageGo to next message
Sandeep Yohans is currently offline Sandeep YohansFriend
Messages: 10
Registered: April 2012
Location: Nagpur, India
Junior Member
Hi,
calling
shell.setMaximized(true)
in
createWindowContents()
works fine without making the application window flicker. But it makes the application open similar to restore mode in Windows environment and not maximized.
( see sample output image. My Eclipse IDE is in maximized state and the application window appears )

I am developing on Windows 7 and Eclipse Indigo.

index.php/fa/12529/0/
  • Attachment: maximized.png
    (Size: 147.45KB, Downloaded 3416 times)

[Updated on: Wed, 28 November 2012 12:27]

Report message to a moderator

Re: Starting a RCP app maximized [message #987889 is a reply to message #987859] Wed, 28 November 2012 14:49 Go to previous messageGo to next message
sam mn is currently offline sam mnFriend
Messages: 26
Registered: August 2010
Junior Member
does getWindowConfigurer().getWindow().getShell().setFullScreen(true)
has the same effect as setMaximized(true) ?
Re: Starting a RCP app maximized [message #988242 is a reply to message #987889] Thu, 29 November 2012 04:53 Go to previous messageGo to next message
Sandeep Yohans is currently offline Sandeep YohansFriend
Messages: 10
Registered: April 2012
Location: Nagpur, India
Junior Member
setFullScreen(true) makes the Title bar and Status Bar of application hidden.
Re: Starting a RCP app maximized [message #990610 is a reply to message #988242] Thu, 13 December 2012 12:14 Go to previous messageGo to next message
Sumit Singh is currently offline Sumit SinghFriend
Messages: 141
Registered: October 2012
Location: Bangalore
Senior Member

You can try Eclipse juno if you are starting Eclispe RCP application Development.
In eclipse juno as Lars says you have to put the tag shellMaximized on the Window or trimmed Window Eclipse 4 Tags
Re: Starting a RCP app maximized [message #1385667 is a reply to message #990610] Tue, 10 June 2014 11:12 Go to previous message
Velganesh Subramanian is currently offline Velganesh SubramanianFriend
Messages: 69
Registered: July 2009
Member
Are all tags defined in IPresentationEngine? I tried "Maximised" and "shellMaximized" but the window is not full screen when launched. Where do we find all the tag names?
Previous Topic:How can I make a muli-line header in TableViewer or Table.
Next Topic:Question regarding Extensions
Goto Forum:
  


Current Time: Thu Mar 28 13:35:07 GMT 2024

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

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

Back to the top