Fullscreen RCP application

Desktop or Web, which choice ? I asking the question. One of the features that makes the difference is the fullscreen mode. Under IE or Firefox a scroll bar stay on the left. In SWT it’s possible to have a real fullscreen mode and also force the window on top. Underneath you see the code to do that, all you have to do is simply set the style of the Shell to NO_TRIM to remove the border and the default header and ON_TOP to force the window on top of the others (actually i don’t know how i can do that in Web) :

public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {

    public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
        super(configurer);
    }

    public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
        return new ApplicationActionBarAdvisor(configurer);
    }

    public void preWindowOpen() {
        IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
        configurer.setShellStyle(SWT.NO_TRIM | SWT.ON_TOP);
        configurer.setShowCoolBar(false);
        configurer.setShowStatusLine(false);
        configurer.setTitle("Test FullScreen RCP");
    }

    @Override
    public void createWindowContents(Shell shell) {
    	super.createWindowContents(shell);
    	shell.setMaximized(true);
    }
}

Une réflexion sur « Fullscreen RCP application »

Les commentaires sont fermés.