Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » how to start application maximized
how to start application maximized [message #453604] Fri, 04 August 2006 07:24 Go to next message
Pete is currently offline PeteFriend
Messages: 26
Registered: July 2009
Junior Member
Hi everyone

i'm trying to start my rcp application maximized. all i can find is this
method setInitialSize(new Point()) but nothing about setMaximized(true) or
something like that. can someone tell me how to do that?

regards
Re: how to start application maximized [message #453606 is a reply to message #453604] Fri, 04 August 2006 07:51 Go to previous messageGo to next message
Karl is currently offline KarlFriend
Messages: 92
Registered: July 2009
Member
i did it like this:

Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
configurer.setInitialSize(new Point(screenSize.height, ScreenSize.width));



Pete schrieb:
> Hi everyone
>
> i'm trying to start my rcp application maximized. all i can find is this
> method setInitialSize(new Point()) but nothing about setMaximized(true)
> or something like that. can someone tell me how to do that?
>
> regards
>
Re: how to start application maximized [message #453619 is a reply to message #453606] Fri, 04 August 2006 09:52 Go to previous messageGo to next message
Stefan Biermann is currently offline Stefan BiermannFriend
Messages: 7
Registered: July 2009
Junior Member
Another solution is that you write the following lines in
postWindowCreate() method of your class that extends the
WorkbenchWindowAdvisor

if(configurer.getWindow().getShell() != null)
configurer.getWindow().getShell().setMaximized(true);

Karl schrieb:
> i did it like this:
>
> Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
> configurer.setInitialSize(new Point(screenSize.height, ScreenSize.width));
>
>
>
> Pete schrieb:
>> Hi everyone
>>
>> i'm trying to start my rcp application maximized. all i can find is
>> this method setInitialSize(new Point()) but nothing about
>> setMaximized(true) or something like that. can someone tell me how to
>> do that?
>>
>> regards
>>
Re: how to start application maximized [message #453626 is a reply to message #453619] Fri, 04 August 2006 12:07 Go to previous messageGo to next message
Pete is currently offline PeteFriend
Messages: 26
Registered: July 2009
Junior Member
hi

thanks for your answers. i've taken them both and it works just fine.

thanks again.

regards
Re: how to start application maximized [message #453659 is a reply to message #453604] Mon, 07 August 2006 15:10 Go to previous message
Martin Sooriam is currently offline Martin SooriamFriend
Messages: 24
Registered: July 2009
Junior Member
Pete,

All I had to do was to call setMaximised(true) on the shell object from
ApplicationWorkbenchWindowAdvisor.java Just override the the
postWindowCreate() method to do this.

Mahesh

/**
* Overriden to maximize the window when shwon.
*/
@Override
public void postWindowCreate() {
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
IWorkbenchWindow window = configurer.getWindow();
window.getShell().setMaximized(true);
}


Pete wrote:
> Hi everyone
>
> i'm trying to start my rcp application maximized. all i can find is this
> method setInitialSize(new Point()) but nothing about setMaximized(true)
> or something like that. can someone tell me how to do that?
>
> regards
>
Previous Topic:How to prevent other plugins from contributing actions to menubar
Next Topic:license for generated rcp code
Goto Forum:
  


Current Time: Sat Oct 05 07:32:22 GMT 2024

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

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

Back to the top