Starting the application maximized [message #634506] |
Thu, 21 October 2010 22:48  |
Eclipse User |
|
|
|
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 #638356 is a reply to message #635517] |
Wed, 10 November 2010 19:25  |
Eclipse User |
|
|
|
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.
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.06702 seconds