Label.setIconDimension deprecated? [message #177700] |
Thu, 14 April 2005 21:16 |
Eclipse User |
|
|
|
Originally posted by: christian.sell.netcologne.de
Hello,
after migrating to M6 I found that the method
org.eclipse.draw2d.Label.setIconDimension(Dimension d)
has been deprecated. However, I found that it was quite handy for
reserving space on labels that did not bear an icon, so that the text
would be aligned with lables that do bear an icon.
I have not found any other way to achieve this, other than providing
invisible icons as placeholders. The method does still achieve the
desired result even in M6, so why not keep it?
thanks,
christian
|
|
|
|
Re: Label.setIconDimension deprecated? [message #177733 is a reply to message #177718] |
Thu, 14 April 2005 22:33 |
Eclipse User |
|
|
|
Originally posted by: christian.sell.netcologne.de
Pratik Shah wrote:
> Alternate ways to do the same:
> -> Use a MarginBorder (this would be the correct way)
> -> Set icon-text gap
if I understand you correctly, that would mean setting the MarginBorder
(or icon/text gap) only on those labels that do not have an icon - right?
The advantage of the setIconDimension approach is that it can be applied
to all labels, irrespective of whether they have an icon or not..
>
> "Christian Sell" <christian.sell@netcologne.de> wrote in message
> news:d3mmv0$orp$1@news.eclipse.org...
>
>>Hello,
>>
>>after migrating to M6 I found that the method
>>
>>org.eclipse.draw2d.Label.setIconDimension(Dimension d)
>>
>>has been deprecated. However, I found that it was quite handy for
>>reserving space on labels that did not bear an icon, so that the text
>>would be aligned with lables that do bear an icon.
>>I have not found any other way to achieve this, other than providing
>>invisible icons as placeholders. The method does still achieve the
>>desired result even in M6, so why not keep it?
>>
>>thanks,
>>christian
>
>
>
|
|
|
Re: Label.setIconDimension deprecated? [message #177741 is a reply to message #177733] |
Thu, 14 April 2005 22:40 |
Pratik Shah Messages: 1077 Registered: July 2009 |
Senior Member |
|
|
"Christian Sell" <christian.sell@netcologne.de> wrote in message
news:d3mrge$uun$1@news.eclipse.org...
> Pratik Shah wrote:
> > Alternate ways to do the same:
> > -> Use a MarginBorder (this would be the correct way)
> > -> Set icon-text gap
>
> if I understand you correctly, that would mean setting the MarginBorder
> (or icon/text gap) only on those labels that do not have an icon - right?
> The advantage of the setIconDimension approach is that it can be applied
> to all labels, irrespective of whether they have an icon or not..
Yeah, but that's a hack.
>
> >
> > "Christian Sell" <christian.sell@netcologne.de> wrote in message
> > news:d3mmv0$orp$1@news.eclipse.org...
> >
> >>Hello,
> >>
> >>after migrating to M6 I found that the method
> >>
> >>org.eclipse.draw2d.Label.setIconDimension(Dimension d)
> >>
> >>has been deprecated. However, I found that it was quite handy for
> >>reserving space on labels that did not bear an icon, so that the text
> >>would be aligned with lables that do bear an icon.
> >>I have not found any other way to achieve this, other than providing
> >>invisible icons as placeholders. The method does still achieve the
> >>desired result even in M6, so why not keep it?
> >>
> >>thanks,
> >>christian
> >
> >
> >
|
|
|
Re: Label.setIconDimension deprecated? [message #177974 is a reply to message #177700] |
Fri, 15 April 2005 20:46 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
We're trying to delete as many fields as possible. That dimension is one
such field. The behavior you are relying on is undefined. It would be
better to wrate a custom-purpose figure which has some hardcoded icon size
such as 16x16. You could do so with far less code than is in Label.
|
|
|
Powered by
FUDForum. Page generated in 0.04570 seconds