Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Problem with ScolledComposites and TabFolder
Problem with ScolledComposites and TabFolder [message #15694] Tue, 10 April 2007 11:57 Go to next message
Eclipse UserFriend
Originally posted by: roberto.sanchez.autonomind.com

Hi all,

Can I use a ScrolledComposite like principal control for my TabItems
(method setControl(...)) in a TabFolder ?

When I use only 1 ScrolledComposite, that is, only for 1 TabItem works
fine, but when I use 2 o more ScrolledComposite for several TabItems It
happens a rare problem, the Workbench never get completed, The others
ViewParts don't appear in screen.

If I run in debug mode the execution (automatically) stops in method:
WidgetUtil.getAdapter( final Widget widget )
in line:
result = ( IWidgetAdapter )widget.getAdapter( IWidgetAdapter.class );
It seems like if there was a breakpoint in that line, but there isn't
anyone.

I'm using the last version of CVS RAP code.

Any idea ?

Thanks in advance.

This is my code:


package test;

import org.eclipse.rap.rwt.RWT;
import org.eclipse.rap.rwt.custom.ScrolledComposite;
import org.eclipse.rap.rwt.layout.FillLayout;
import org.eclipse.rap.rwt.widgets.Composite;
import org.eclipse.rap.rwt.widgets.TabFolder;
import org.eclipse.rap.rwt.widgets.TabItem;
import org.eclipse.rap.ui.PlatformUI;
import org.eclipse.rap.ui.part.ViewPart;


public class TabFolderViewPart extends ViewPart {

protected TabFolder folder = null;

@Override
public void createPartControl(Composite parent) {
parent.setLayout( new FillLayout() );

folder = new TabFolder( parent, RWT.FLAT );

TabItem item = new TabItem( folder, RWT.FLAT );
item.setText( "Tab ONE" );
item.setControl(new ScrolledComposite(folder, RWT.NONE));

item = new TabItem( folder, RWT.FLAT );
item.setText( "Tab TWO" );
item.setControl(new ScrolledComposite(folder, RWT.NONE));

parent.layout();
}

public void setFocus() {
cvTabs.forceFocus();
}
}
Re: Problem with ScolledComposites and TabFolder [message #15716 is a reply to message #15694] Tue, 10 April 2007 13:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rsternberg.innoopract.com

Hi Roberto,

there was a bug in a JavaScript file (ScrolledComposite.js). If you
check out the latest version from CVS, your example should work.

Thanks for reporting this issue.

Cheers,
Ralf

Roberto schrieb:
> Can I use a ScrolledComposite like principal control for my TabItems
> (method setControl(...)) in a TabFolder ?
>
> When I use only 1 ScrolledComposite, that is, only for 1 TabItem works
> fine, but when I use 2 o more ScrolledComposite for several TabItems It
> happens a rare problem, the Workbench never get completed, The others
> ViewParts don't appear in screen.
>
> If I run in debug mode the execution (automatically) stops in method:
> WidgetUtil.getAdapter( final Widget widget )
> in line:
> result = ( IWidgetAdapter )widget.getAdapter( IWidgetAdapter.class );
> It seems like if there was a breakpoint in that line, but there isn't
> anyone.
>
> I'm using the last version of CVS RAP code.
>
> Any idea ?
>
> Thanks in advance.
>
> This is my code:
>
>
> package test;
>
> import org.eclipse.rap.rwt.RWT;
> import org.eclipse.rap.rwt.custom.ScrolledComposite;
> import org.eclipse.rap.rwt.layout.FillLayout;
> import org.eclipse.rap.rwt.widgets.Composite;
> import org.eclipse.rap.rwt.widgets.TabFolder;
> import org.eclipse.rap.rwt.widgets.TabItem;
> import org.eclipse.rap.ui.PlatformUI;
> import org.eclipse.rap.ui.part.ViewPart;
>
>
> public class TabFolderViewPart extends ViewPart {
>
> protected TabFolder folder = null;
>
> @Override
> public void createPartControl(Composite parent) {
> parent.setLayout( new FillLayout() );
>
> folder = new TabFolder( parent, RWT.FLAT );
>
> TabItem item = new TabItem( folder, RWT.FLAT );
> item.setText( "Tab ONE" );
> item.setControl(new ScrolledComposite(folder, RWT.NONE));
>
> item = new TabItem( folder, RWT.FLAT );
> item.setText( "Tab TWO" );
> item.setControl(new ScrolledComposite(folder, RWT.NONE));
>
> parent.layout();
> }
>
> public void setFocus() {
> cvTabs.forceFocus();
> }
> }
>
>
>
>
>
>
>
>
>
>
>
Re: Problem with ScolledComposites and TabFolder [message #15734 is a reply to message #15716] Tue, 10 April 2007 13:48 Go to previous message
Eclipse UserFriend
Originally posted by: roberto.sanchez.autonomind.com

Wow!! That was really fast !! Good work !! ;-)

Thank you very much, now It works perfect. :-)

Bye.

Ralf Sternberg wrote:
> Hi Roberto,
>
> there was a bug in a JavaScript file (ScrolledComposite.js). If you
> check out the latest version from CVS, your example should work.
>
> Thanks for reporting this issue.
>
> Cheers,
> Ralf
>
> Roberto schrieb:
>> Can I use a ScrolledComposite like principal control for my TabItems
>> (method setControl(...)) in a TabFolder ?
>>
>> When I use only 1 ScrolledComposite, that is, only for 1 TabItem works
>> fine, but when I use 2 o more ScrolledComposite for several TabItems
>> It happens a rare problem, the Workbench never get completed, The
>> others ViewParts don't appear in screen.
>>
>> If I run in debug mode the execution (automatically) stops in method:
>> WidgetUtil.getAdapter( final Widget widget )
>> in line:
>> result = ( IWidgetAdapter )widget.getAdapter( IWidgetAdapter.class );
>> It seems like if there was a breakpoint in that line, but there isn't
>> anyone.
>>
>> I'm using the last version of CVS RAP code.
>>
>> Any idea ?
>>
>> Thanks in advance.
>>
>> This is my code:
>>
>>
>> package test;
>>
>> import org.eclipse.rap.rwt.RWT;
>> import org.eclipse.rap.rwt.custom.ScrolledComposite;
>> import org.eclipse.rap.rwt.layout.FillLayout;
>> import org.eclipse.rap.rwt.widgets.Composite;
>> import org.eclipse.rap.rwt.widgets.TabFolder;
>> import org.eclipse.rap.rwt.widgets.TabItem;
>> import org.eclipse.rap.ui.PlatformUI;
>> import org.eclipse.rap.ui.part.ViewPart;
>>
>>
>> public class TabFolderViewPart extends ViewPart {
>>
>> protected TabFolder folder = null;
>>
>> @Override
>> public void createPartControl(Composite parent) {
>> parent.setLayout( new FillLayout() );
>>
>> folder = new TabFolder( parent, RWT.FLAT );
>> TabItem item = new TabItem( folder, RWT.FLAT );
>> item.setText( "Tab ONE" );
>> item.setControl(new ScrolledComposite(folder, RWT.NONE));
>>
>> item = new TabItem( folder, RWT.FLAT );
>> item.setText( "Tab TWO" );
>> item.setControl(new ScrolledComposite(folder, RWT.NONE));
>>
>> parent.layout();
>> }
>>
>> public void setFocus() {
>> cvTabs.forceFocus();
>> }
>> }
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
Previous Topic:M2 build - source attachment did not work
Next Topic:poor performance in Tree Views
Goto Forum:
  


Current Time: Wed Apr 24 22:34:36 GMT 2024

Powered by FUDForum. Page generated in 0.03366 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top