What's the point of making main RAP window resizable ? [message #54131] |
Mon, 22 October 2007 13:16 |
|
Hi all,
We can specify the main RAP window to be resizable,minimizable,maximizable
etc. But I don't see the point of specifying them in RAP since unlike
desktop application we can not open more than one RAP application in one
browser window. Besides, once minimized we're unable to restore it back.
Or am I missing something here ?
Best Regards,
Setya
|
|
|
|
Re: What's the point of making main RAP window resizable ? [message #54420 is a reply to message #54314] |
Tue, 23 October 2007 05:17 |
|
Hi,
> don't talk about a "RAP window". It's just a SWT shell behind the scenes
> and multiple shells are a regular use case in RAP applications :)
> Furthermore can you set the shell styles yourself by using
> IWorkbenchWindowConfigurer#setShellStyle to modify these settings if you
> don't want to have the buttons.
Yes, I've tried various setting through setShellStyle method using
SWT.NONE,SWT.TITLE,SWT.RESIZE, etc.
> Additionally it's not really impossible
> to have only a single workbench window. It's just not yet implemented as
> we didn't saw the need ;)
I don't understand this. Isn't having only a single workbench window is
the only option we have at the moment ?
Best Regards,
Setya
|
|
|
Re: What's the point of making main RAP window resizable ? [message #54528 is a reply to message #54420] |
Tue, 23 October 2007 09:40 |
Eclipse User |
|
|
|
Originally posted by: fappel.innoopract.com
Hi,
there's only one Workbench instance per session available, but there can be
multiple Workbench Windows. Try this for example
public Display createUI() {
final Display result = PlatformUI.createDisplay();
PlatformUI.createAndRunWorkbench( result, new DemoWorbenchAdvisor() );
PlatformUI.createAndRunWorkbench( result, new DemoWorbenchAdvisor() );
return result;
}
This works at the moment only to some extend. Closing one window will close
the workbench so the other window loses its backend... so there is still
some work to do to.
Another snippet shows how restore could be implemented somewhat useful (at
least in theory, it is not working at the moment since shell still lacks
some functionality):
public Display createUI() {
final Display result = PlatformUI.createDisplay();
PlatformUI.createAndRunWorkbench( result, new DemoWorbenchAdvisor() );
final Shell workbenchShell = result.getActiveShell();
Shell shell = new Shell( result, SWT.NONE );
shell.setLayout( new FillLayout() );
Button button = new Button( shell, SWT.PUSH );
button.setText( "Restore" );
button.addSelectionListener( new SelectionAdapter() {
public void widgetSelected( final SelectionEvent evt ) {
workbenchShell.setMinimized( false );
}
} );
shell.pack();
shell.open();
return result;
}
Ciao
Frank
"Setya" <jsetya@gmail.com> schrieb im Newsbeitrag
news:6e13b1dbaeed758bed328627eac3b65e$1@www.eclipse.org...
> Hi,
>
>> don't talk about a "RAP window". It's just a SWT shell behind the scenes
>> and multiple shells are a regular use case in RAP applications :)
>> Furthermore can you set the shell styles yourself by using
>> IWorkbenchWindowConfigurer#setShellStyle to modify these settings if you
>> don't want to have the buttons.
>
> Yes, I've tried various setting through setShellStyle method using
> SWT.NONE,SWT.TITLE,SWT.RESIZE, etc.
>
>> Additionally it's not really impossible to have only a single workbench
>> window. It's just not yet implemented as we didn't saw the need ;)
>
> I don't understand this. Isn't having only a single workbench window is
> the only option we have at the moment ?
>
> Best Regards,
>
> Setya
>
|
|
|
Re: What's the point of making main RAP window resizable ? [message #54554 is a reply to message #54528] |
Tue, 23 October 2007 10:36 |
|
Hi,
> public Display createUI() {
> final Display result = PlatformUI.createDisplay();
> PlatformUI.createAndRunWorkbench( result, new DemoWorbenchAdvisor() );
> PlatformUI.createAndRunWorkbench( result, new DemoWorbenchAdvisor() );
> return result;
> }
> public Display createUI() {
> final Display result = PlatformUI.createDisplay();
> PlatformUI.createAndRunWorkbench( result, new DemoWorbenchAdvisor() );
> final Shell workbenchShell = result.getActiveShell();
> Shell shell = new Shell( result, SWT.NONE );
> shell.setLayout( new FillLayout() );
> Button button = new Button( shell, SWT.PUSH );
> button.setText( "Restore" );
> button.addSelectionListener( new SelectionAdapter() {
> public void widgetSelected( final SelectionEvent evt ) {
> workbenchShell.setMinimized( false );
> }
> } );
> shell.pack();
> shell.open();
> return result;
> }
Thank you for the snippets Frank.
Regards,
Setya
|
|
|
Powered by
FUDForum. Page generated in 0.03601 seconds