Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Problrm with layout / embedded groups
Problrm with layout / embedded groups [message #18636] Thu, 19 April 2007 10:28 Go to next message
Richard Desbiolles is currently offline Richard DesbiollesFriend
Messages: 23
Registered: July 2009
Junior Member
Hi All,

I suspect a bug on the layout management :

The case is a Group 'wGroup02' and a TabFolder 'wTabFolder' embedded in
a parent Group 'wGroup01'.

It behaves like if the components written under wGroup02, wTabFolder
were in reality created under wGroup01. It is especially visible because
the border of wGroup02, wTabBorder don't surround their children
components (a result is rather ugly !) like if the size calculation failed.


To Illustrate, I enhance the Demo (controls part), with changes in
ButtonTab.java :

After the lines :

...
label.setText( "Enter some text and press Return" );
final Text text = new Text( group, RWT.BORDER | RWT.SINGLE );

I add :

// T. Wing extra code
final Group groupTWing = new Group ( group, RWT.NONE );
groupTWing.setText( "Default Button" );
groupTWing.setLayout( new GridLayout( 1, false ) );
Label labelTwing = new Label( groupTWing, RWT.NONE );
groupTWing.setText( "from T. Wing" );
final Text textTWing = new Text(groupTWing,RWT.BORDER|RWT.SINGLE );

The code goes on with :

defaultButton = new Button( group, style | RWT.PUSH );
...


You can execute and observe the default behaviour.


What do you think ? DO I do a mistake anywhere ?


Thanks in advance for your help,

Thomas
Re: Problrm with layout / embedded groups [message #18686 is a reply to message #18636] Thu, 19 April 2007 10:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rsternberg.innoopract.com

Hi Thomas,

Thomas Wing schrieb:
> I suspect a bug on the layout management :
>
> The case is a Group 'wGroup02' and a TabFolder 'wTabFolder' embedded in
> a parent Group 'wGroup01'.
>
> It behaves like if the components written under wGroup02, wTabFolder
> were in reality created under wGroup01. It is especially visible because
> the border of wGroup02, wTabBorder don't surround their children
> components (a result is rather ugly !) like if the size calculation failed.
>

we tried out your code and for us the result looks correct. The
additional Group appears inside the parent Group, containing the
(invisible) Label and the Text field. The Label is invisible as there is
no text or image set. Instead you overwrite the title of the Group
"groupTWing".

> Label labelTwing = new Label( groupTWing, RWT.NONE );
> groupTWing.setText( "from T. Wing" );

I suppose this line should read

labelTwing.setText( "from T. Wing" );

Could this explain the unexpected layout?

Regards,
Ralf
Re: Problrm with layout / embedded groups [message #18902 is a reply to message #18686] Thu, 19 April 2007 19:28 Go to previous messageGo to next message
Richard Desbiolles is currently offline Richard DesbiollesFriend
Messages: 23
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.
--------------030909030409070808050208
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Ralf Sternberg a
Re: Problrm with layout / embedded groups [message #19009 is a reply to message #18686] Fri, 20 April 2007 05:53 Go to previous messageGo to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
Hi Ralf,

Thomas is right, there is exists a bug when computing the size of a group.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=182310 for details. You
may want to take a look at the bugzilla entry, there is a very simple code
snippet and a screenshot attached.

Have a nice day,
Stefan.



"Ralf Sternberg" <rsternberg@innoopract.com> schrieb im Newsbeitrag
news:f07hhf$4eq$1@build.eclipse.org...
> Hi Thomas,
>
> Thomas Wing schrieb:
>> I suspect a bug on the layout management :
>>
>> The case is a Group 'wGroup02' and a TabFolder 'wTabFolder' embedded in a
>> parent Group 'wGroup01'.
>>
>> It behaves like if the components written under wGroup02, wTabFolder were
>> in reality created under wGroup01. It is especially visible because the
>> border of wGroup02, wTabBorder don't surround their children components
>> (a result is rather ugly !) like if the size calculation failed.
>>
>
> we tried out your code and for us the result looks correct. The additional
> Group appears inside the parent Group, containing the (invisible) Label
> and the Text field. The Label is invisible as there is no text or image
> set. Instead you overwrite the title of the Group "groupTWing".
>
>> Label labelTwing = new Label( groupTWing, RWT.NONE );
>> groupTWing.setText( "from T. Wing" );
>
> I suppose this line should read
>
> labelTwing.setText( "from T. Wing" );
>
> Could this explain the unexpected layout?
>
> Regards,
> Ralf
Re: Problrm with layout / embedded groups [message #19278 is a reply to message #18902] Fri, 20 April 2007 08:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rsternberg.innoopract.com

Hi Thomas,

Thomas Wing schrieb:
> Thanks for wou quick answer ... and sorry for the mistake in the code.
>
> I changed it in
>
> // T. Wing extra code
> final Group groupTWing = new Group ( group, RWT.NONE );
> // groupTWing.setLayoutData( new RowData( 200, 60 ) );
> groupTWing.setText( "Twing Group" );
> groupTWing.setLayout( new GridLayout( 1, false ) );
> // Label labelTwing = new Label( groupTWing, RWT.NONE );
> // labelTwing.setText( "from T. Wing" );
> final Text textTWing = new Text( groupTWing, RWT.BORDER | RWT.SINGLE );
>
> And the result is in the first part of the joined document.
>
>
> As I said I'm trying to take a GUI from RCP to RAP.
> I made minimum changes, only on listeners (Double clic, ...) and for
> functionnalities not yet cover covered by RAP (Cell Modifier,
> SetItemCount, ...), but the main task was to change swt/jface import to
> rap !
>
> The problem is when executing and I also join a screen got frol RCP, and
> the same with RAP. It's what I tried to expose by enhancing the demo
> software.
>
> Best regards,
>
> Thomas
>
> I also join the version of my RAP plugins.

thanks for the screenshots. They make it easier to understand your problem.

Generally speaking, size computations are still not perfect and will
undergo a revision during the development of the RWT theme management
(part of the M4 milestone).

However, the computation of the Group size has been fixed as of March,
19. I see from your plugins screenshot that your version of the RWT
plugin dates from March, 02. I'd recommend that you check out the latest
version from CVS which should fix many of your layout problems already.
If you prefer milestone builds, you can also wait for the M3 which will
be released by end of next week.

Best regards,
Ralf
Re: Problrm with layout / embedded groups [message #19334 is a reply to message #19009] Fri, 20 April 2007 09:12 Go to previous message
Eclipse UserFriend
Originally posted by: rsternberg.innoopract.com

Hi Stephan,

Stefan Röck schrieb:
> Thomas is right, there is exists a bug when computing the size of a group.
> See https://bugs.eclipse.org/bugs/show_bug.cgi?id=182310 for details. You
> may want to take a look at the bugzilla entry, there is a very simple code
> snippet and a screenshot attached.

Thanks for the pointer, I must have missed this bug report.
The problem was the missing computeTrim method in the Group widget. This
has been fixed as of 2007-03-19. Please try if your code works with the
latest version of RAP from CVS.

Cheers, Ralf
Previous Topic:Lost connection with server
Next Topic:[ANN] move to "org.eclipse.swt" namespace and new plan
Goto Forum:
  


Current Time: Thu Apr 25 14:28:04 GMT 2024

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

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

Back to the top