Fix browser windows resize
authorMathieu Baudier <mbaudier@argeo.org>
Sun, 17 Mar 2013 15:20:14 +0000 (15:20 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Sun, 17 Mar 2013 15:20:14 +0000 (15:20 +0000)
https://www.argeo.org/bugzilla/show_bug.cgi?id=137

git-svn-id: https://svn.argeo.org/commons/trunk@6149 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

security/plugins/org.argeo.security.ui.rap/src/main/java/org/argeo/security/ui/rap/RapWindowAdvisor.java

index d5c2442f101620bd69b620d5f3e68b1016e9828b..1f5d5679248ca3a0a060354568f98dad7784f3c3 100644 (file)
@@ -16,6 +16,7 @@
 package org.argeo.security.ui.rap;
 
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.widgets.Display;
@@ -50,14 +51,20 @@ public class RapWindowAdvisor extends WorkbenchWindowAdvisor {
                configurer.setShowMenuBar(false);
                configurer.setShowStatusLine(false);
                configurer.setShowPerspectiveBar(true);
-               configurer.setTitle("Argeo Secure UI"); //$NON-NLS-1$
-               // Full screen, see
-               // http://dev.eclipse.org/newslists/news.eclipse.technology.rap/msg02697.html
-               configurer.setShellStyle(SWT.NONE);
+               configurer.setTitle("Argeo Web UI"); //$NON-NLS-1$
+               // Full screen, see 
+               // http://wiki.eclipse.org/RAP/FAQ#How_to_create_a_fullscreen_application
+               configurer.setShellStyle(SWT.NO_TRIM);
                Rectangle bounds = Display.getCurrent().getBounds();
                configurer.setInitialSize(new Point(bounds.width, bounds.height));
        }
 
+       @Override
+       public void postWindowCreate() {
+               Shell shell = getWindowConfigurer().getWindow().getShell();
+               shell.setMaximized(true);
+       }
+
        @Override
        public void postWindowOpen() {
                String defaultPerspective = getWindowConfigurer()