Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Label does not resize after changing text in GEF 3.1
Label does not resize after changing text in GEF 3.1 [message #194733] Mon, 05 September 2005 15:22 Go to next message
Jose M Beleta is currently offline Jose M BeletaFriend
Messages: 70
Registered: July 2009
Member
A Label does not resize itself after changing text using the method
setText() in GEF 3.1. Neither revalidate or validate change the size to
accommodate the new text. The only way to solve this issue is to call:

label.setSize(label.getPreferredSize());

Is this the intended behaviour? If this is the case don't you think that it
is more complicated and far less intuitive that the 3.0 behaviour.

Jose M Beleta
Re: Label does not resize after changing text in GEF 3.1 [message #194809 is a reply to message #194733] Tue, 06 September 2005 13:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

Are you saying this was working in 3.0 and now does not in 3.1? What is the
layout of the label's parent container?

"Jose M Beleta" <beleta@attglobal.net> wrote in message
news:dfhnqq$11g$1@news.eclipse.org...
> A Label does not resize itself after changing text using the method
> setText() in GEF 3.1. Neither revalidate or validate change the size to
> accommodate the new text. The only way to solve this issue is to call:
>
> label.setSize(label.getPreferredSize());
>
> Is this the intended behaviour? If this is the case don't you think that
it
> is more complicated and far less intuitive that the 3.0 behaviour.
>
> Jose M Beleta
>
>
>
>
Re: Label does not resize after changing text in GEF 3.1 [message #195007 is a reply to message #194809] Wed, 07 September 2005 13:26 Go to previous messageGo to next message
Jose M Beleta is currently offline Jose M BeletaFriend
Messages: 70
Registered: July 2009
Member
Thank you for your reply.

> Are you saying this was working in 3.0 and now does not in 3.1?

Yes.

> What is the layout of the label's parent container?

I don't know. The parent container is the IFigure obtained using:

GraphicalEditPolicy.getLayer(LayerConstants.FEEDBACK_LAYER);

Jose M Beleta
Re: Label does not resize after changing text in GEF 3.1 [message #195069 is a reply to message #194733] Wed, 07 September 2005 19:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

The parent must be validated to position the child. If the parent is the
feedback layer, it has no layout so validate is a no-op.

In 3.0, most figures had a bogus default size of 64x32. Maybe this is the
difference?

"Jose M Beleta" <beleta@attglobal.net> wrote in message
news:dfhnqq$11g$1@news.eclipse.org...
>A Label does not resize itself after changing text using the method
>setText() in GEF 3.1. Neither revalidate or validate change the size to
>accommodate the new text. The only way to solve this issue is to call:
>
> label.setSize(label.getPreferredSize());
>
> Is this the intended behaviour? If this is the case don't you think that
> it is more complicated and far less intuitive that the 3.0 behaviour.
>
> Jose M Beleta
>
>
>
>
Re: Label does not resize after changing text in GEF 3.1 [message #195312 is a reply to message #195069] Fri, 09 September 2005 12:49 Go to previous message
Jose M Beleta is currently offline Jose M BeletaFriend
Messages: 70
Registered: July 2009
Member
> Maybe this is the difference?

Probably, my text is normally smaller than this default size so I did not
notice the problem in 3.0.

Jose M Beleta

"Randy Hudson" <none@us.ibm.com> escribi
Previous Topic:object selection
Next Topic:Self-Connections When Using BendpointConnectionRouter
Goto Forum:
  


Current Time: Fri Apr 26 06:46:49 GMT 2024

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

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

Back to the top