Draw2d Label bounds [message #195163] |
Thu, 08 September 2005 12:05  |
Eclipse User |
|
|
|
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 12:17   |
Eclipse User |
|
|
|
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 #195240 is a reply to message #195218] |
Thu, 08 September 2005 15:15   |
Eclipse User |
|
|
|
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?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.23690 seconds