Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Riena » Starting the application maximized
Starting the application maximized [message #634506] Fri, 22 October 2010 02:48 Go to next message
Bill Jones is currently offline Bill JonesFriend
Messages: 5
Registered: April 2010
Junior Member
I am trying to figure out how to automatically maximize my application
window on startup. I know there are system properties that I can set,
but is there a more dynamic mechanism available?

Thanks,
Bill
Re: Starting the application maximized [message #635517 is a reply to message #634506] Wed, 27 October 2010 07:51 Go to previous messageGo to next message
Amel Jakupovic is currently offline Amel JakupovicFriend
Messages: 64
Registered: March 2010
Member
Hi Bill,

in Application.java I put:

    @Override
    protected IApplicationNode createModel() {
    	
    	Toolkit toolkit = Toolkit.getDefaultToolkit();

		// Get the current screen size
		Dimension scrnsize = toolkit.getScreenSize();


    	System.setProperty("riena.application.minimum.width", "" + scrnsize.width);
    	System.setProperty("riena.application.minimum.height", ""  + scrnsize.height);
    	 
    	 
        IApplicationNode applicationNode = super.createModel();
        applicationNode.setLabel("test");
        
   
        
        return applicationNode;
    }


this is example with properties... you can track in debug how it is done with riena.

Re: Starting the application maximized [message #638356 is a reply to message #635517] Thu, 11 November 2010 00:25 Go to previous message
Bill Jones is currently offline Bill JonesFriend
Messages: 5
Registered: April 2010
Junior Member
Hi Amel,

Just wanted to say thanks for the response.

Here's what we ended up doing -

> @Override
> protected ApplicationController createApplicationController(IApplicationNode node) {
> final ApplicationController controller = new ApplicationController(node) {
> @Override
> public void afterBind() {
> super.afterBind();
> Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShel l();
> shell.setMaximized(true);
> }
> };

But this doesn't work on all platforms (although it does work on
Windows, which is our primary).. Your solution may be more general -
thanks!

/Bill

On 10/27/10 3:51 AM, Amel Jakupovic wrote:
> Hi Bill,
>
> in Application.java I put:
>
>
> @Override
> protected IApplicationNode createModel() {
>
> Toolkit toolkit = Toolkit.getDefaultToolkit();
>
> // Get the current screen size
> Dimension scrnsize = toolkit.getScreenSize();
>
>
> System.setProperty("riena.application.minimum.width", "" + scrnsize.width);
> System.setProperty("riena.application.minimum.height", "" +
> scrnsize.height);
> IApplicationNode applicationNode = super.createModel();
> applicationNode.setLabel("test");
> return applicationNode;
> }
>
>
> this is example with properties... you can track in debug how it is done
> with riena.
>
>
Previous Topic:Riena 3.0.0M2 now also with RAP support
Next Topic:DeferredTreeContentManager Tutorial
Goto Forum:
  


Current Time: Thu Apr 25 21:14:10 GMT 2024

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

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

Back to the top