Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Draw2d Label bounds
Draw2d Label bounds [message #195163] Thu, 08 September 2005 16:05 Go to next message
Eclipse UserFriend
Originally posted by: rsudra.no.spam.hotmail.com

With Draw2d 3.0.1 I could do:

new Label(".....").getBounds()

which would return bounds with (0, 0, 64, 36)

3.1.0, the same returns bounds with (0, 0, 0, 0)

Now, I have to resize the label with the width and height above where
before I didn't. I am adding the label to its parent later.

Has the api/behaviour changed?

Thanks
Raj
Re: Draw2d Label bounds [message #195181 is a reply to message #195163] Thu, 08 September 2005 16:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mvsteenbergen.eljakim.scratch-this.nl

If I understand previous messages in this newsgroup correctly, a
figure's initial size is now (0, 0).

Have you tried calling getPreferredSize() on the newly created label
instead?

Regards,

Martijn.

Rajeev Sudra wrote:
> With Draw2d 3.0.1 I could do:
>
> new Label(".....").getBounds()
>
> which would return bounds with (0, 0, 64, 36)
>
> 3.1.0, the same returns bounds with (0, 0, 0, 0)
>
> Now, I have to resize the label with the width and height above where
> before I didn't. I am adding the label to its parent later.
>
> Has the api/behaviour changed?
>
> Thanks
> Raj
>
>
Re: Draw2d Label bounds [message #195188 is a reply to message #195181] Thu, 08 September 2005 16:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mvsteenbergen.eljakim.scratch-this.nl

Martijn van Steenbergen wrote:
> If I understand previous messages in this newsgroup correctly, a
> figure's initial size is now (0, 0).

See news://news.eclipse.org:119/d3m0hj$nm5$1@news.eclipse.org
Re: Draw2d Label bounds [message #195218 is a reply to message #195188] Thu, 08 September 2005 17:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rsudra.hotmail.com

Hello Martijn,

I couldn't see the message, any chance you could repost the guts to this
thread please?

Thanks for the response.
Raj

> Martijn van Steenbergen wrote:
>
>> If I understand previous messages in this newsgroup correctly, a
>> figure's initial size is now (0, 0).
>>
> See news://news.eclipse.org:119/d3m0hj$nm5$1@news.eclipse.org
>
Re: Draw2d Label bounds [message #195240 is a reply to message #195218] Thu, 08 September 2005 19:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mvsteenbergen.eljakim.scratch-this.nl

Randy Hudson wrote on 14/04/2005:

---
Some time back, the default size for a figure changed from 64,32 to 0,0.
This was done for performance reason. The default size was meaningless,
yet it had the result that adding a figure and then laying out it's
parent resulted in a damage region that was larger than necessary. The
figure had never painted at 0,0,64,32, so when it moved, there is not
really reason to erase the region. Now that it is initially nowhere, it
doesn't need to erase during the first layout.
---

M.

Rajeev Sudra wrote:
> Hello Martijn,
>
> I couldn't see the message, any chance you could repost the guts to this
> thread please?
Re: Draw2d Label bounds [message #195357 is a reply to message #195240] Fri, 09 September 2005 14:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rsudra.hotmail.com

Thanks,

What is the strategy for having the bounds of the Label compacted so it perfectly
fits the text supplied in the constructor?
Re: Draw2d Label bounds [message #195417 is a reply to message #195357] Fri, 09 September 2005 18:05 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Set it to its preferred size, or place it in a layout that does the same.

"Rajeev Sudra" <rsudra@hotmail.com> wrote in message
news:bd907dc11ab0c8c7836c63d07110@news.eclipse.org...
> Thanks,
>
> What is the strategy for having the bounds of the Label compacted so it
> perfectly fits the text supplied in the constructor?
>
>
Previous Topic:DirectedGraphLayout changed for 3.1?
Next Topic:collapsing a figure
Goto Forum:
  


Current Time: Thu Apr 25 20:14:23 GMT 2024

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

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

Back to the top