Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "RapTipsTricks"

(Fill the browser with the Workbench Window)
Line 15: Line 15:
 
     configurer.setShowStatusLine( false );
 
     configurer.setShowStatusLine( false );
 
     configurer.setTitle( "Your app" );
 
     configurer.setTitle( "Your app" );
     configurer.setShellStyle( SWT.NONE );
+
     configurer.setShellStyle( SWT.NO_TRIM );
    Rectangle bounds = Display.getDefault().getBounds();
+
    configurer.setInitialSize(new Point(bounds.width, bounds.height));
+
 
   }
 
   }
  

Revision as of 04:56, 4 April 2008

| RAP wiki home | RAP project home |

This section intends to host tricks and tips, snippets, ..., about RAP and RWT... Any help is welcome.

Workbench Window

Fill the browser with the Workbench Window

This snippet shows you how to make the main RAP Workbench Window occupy the entire area available in the browser and resize with the browser window.

In your WorkbenchWindowAdvisor class:

   public void preWindowOpen() {
     IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
     configurer.setShowStatusLine( false );
     configurer.setTitle( "Your app" );
     configurer.setShellStyle( SWT.NO_TRIM );
   }
 
   public void postWindowOpen() {
     final IWorkbenchWindow window = getWindowConfigurer().getWindow();
     Shell shell = window.getShell();
     shell.setMaximized( true );
   }

Back to the top