draw2d label setPreferredSize() method does not set prefSize [message #188545] |
Thu, 21 July 2005 07:53 |
Eclipse User |
|
|
|
Originally posted by: nathanoj.gmail.com
hi all,
I am trying to set the preferred size of my Label inside a flowlayout
because i want it to have a fixed sized. i tried using setPreferredSize()
method and found out while debugging that label prefSize is being set to
null always because the Figure class calls the invalidate method of the
Label class(which sets prefSize to null again) after setting the prefSize.
I am using GEF 3.1 now.
Thanks and hope someone can enlighten me on this...
|
|
|
Re: draw2d label setPreferredSize() method does not set prefSize [message #188566 is a reply to message #188545] |
Thu, 21 July 2005 14:37 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Label uses that field to cache its own prefered size calculation.
"nathanoj" <nathanoj@gmail.com> wrote in message
news:dbnk85$o7p$1@news.eclipse.org...
> hi all,
>
> I am trying to set the preferred size of my Label inside a flowlayout
> because i want it to have a fixed sized. i tried using setPreferredSize()
> method and found out while debugging that label prefSize is being set to
> null always because the Figure class calls the invalidate method of the
> Label class(which sets prefSize to null again) after setting the prefSize.
>
> I am using GEF 3.1 now.
>
> Thanks and hope someone can enlighten me on this...
>
|
|
|
Re: draw2d label setPreferredSize() method does not set prefSize [message #188653 is a reply to message #188566] |
Fri, 22 July 2005 02:02 |
Eclipse User |
|
|
|
Originally posted by: nathanoj.gmail.com
Thanks for the reply sir.
So is there some other way i can fixed the size of the Label figure in a
flowlayout?
"Randy Hudson" <none@us.ibm.com> wrote in message
news:dboc04$na9$1@news.eclipse.org...
> Label uses that field to cache its own prefered size calculation.
>
> "nathanoj" <nathanoj@gmail.com> wrote in message
> news:dbnk85$o7p$1@news.eclipse.org...
>> hi all,
>>
>> I am trying to set the preferred size of my Label inside a flowlayout
>> because i want it to have a fixed sized. i tried using setPreferredSize()
>> method and found out while debugging that label prefSize is being set to
>> null always because the Figure class calls the invalidate method of the
>> Label class(which sets prefSize to null again) after setting the
>> prefSize.
>>
>> I am using GEF 3.1 now.
>>
>> Thanks and hope someone can enlighten me on this...
>>
>
>
|
|
|
Re: draw2d label setPreferredSize() method does not set prefSize [message #188669 is a reply to message #188653] |
Fri, 22 July 2005 03:10 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
You'd have to override the way it calculates preferred size to just always
return the protected field.
"nathanoj" <nathanoj@gmail.com> wrote in message
news:dbpk1b$6en$1@news.eclipse.org...
> Thanks for the reply sir.
>
> So is there some other way i can fixed the size of the Label figure in a
> flowlayout?
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:dboc04$na9$1@news.eclipse.org...
>> Label uses that field to cache its own prefered size calculation.
>>
>> "nathanoj" <nathanoj@gmail.com> wrote in message
>> news:dbnk85$o7p$1@news.eclipse.org...
>>> hi all,
>>>
>>> I am trying to set the preferred size of my Label inside a flowlayout
>>> because i want it to have a fixed sized. i tried using
>>> setPreferredSize() method and found out while debugging that label
>>> prefSize is being set to null always because the Figure class calls the
>>> invalidate method of the Label class(which sets prefSize to null again)
>>> after setting the prefSize.
>>>
>>> I am using GEF 3.1 now.
>>>
>>> Thanks and hope someone can enlighten me on this...
>>>
>>
>>
>
>
|
|
|
Re: draw2d label setPreferredSize() method does not set prefSize [message #188677 is a reply to message #188669] |
Fri, 22 July 2005 05:51 |
Eclipse User |
|
|
|
Originally posted by: nathanoj.gmail.com
thanks again sir.
i just overriden the getPreferredSize method to return always the size that
I want for the label...
"Randy Hudson" <none@us.ibm.com> wrote in message
news:dbpo2d$9vl$1@news.eclipse.org...
> You'd have to override the way it calculates preferred size to just always
> return the protected field.
>
> "nathanoj" <nathanoj@gmail.com> wrote in message
> news:dbpk1b$6en$1@news.eclipse.org...
>> Thanks for the reply sir.
>>
>> So is there some other way i can fixed the size of the Label figure in a
>> flowlayout?
>>
>> "Randy Hudson" <none@us.ibm.com> wrote in message
>> news:dboc04$na9$1@news.eclipse.org...
>>> Label uses that field to cache its own prefered size calculation.
>>>
>>> "nathanoj" <nathanoj@gmail.com> wrote in message
>>> news:dbnk85$o7p$1@news.eclipse.org...
>>>> hi all,
>>>>
>>>> I am trying to set the preferred size of my Label inside a flowlayout
>>>> because i want it to have a fixed sized. i tried using
>>>> setPreferredSize() method and found out while debugging that label
>>>> prefSize is being set to null always because the Figure class calls the
>>>> invalidate method of the Label class(which sets prefSize to null again)
>>>> after setting the prefSize.
>>>>
>>>> I am using GEF 3.1 now.
>>>>
>>>> Thanks and hope someone can enlighten me on this...
>>>>
>>>
>>>
>>
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04278 seconds