Skip to main content



      Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Issues about LabelProvider and TreeViewer(Issues about LabelProvider and TreeViewer)
icon9.gif  Issues about LabelProvider and TreeViewer [message #499162] Fri, 20 November 2009 03:35 Go to next message
Eclipse UserFriend
Hi Folks:

Firts of all, thanks for you help. I talk you about my problem:

I'm developing a plug-in to parser a file and view the results as a tree, using a TreeViewer. For each leaf, I use a LabelProvider with a text and icon. I have a class that extends LabelProvider and here, I've implemented methods getText() and getImage(). I see, the icon is always in the first position and then the text. Is there any way to change that? I'd like to put the text first and icon, next.

If that is not possible, is there any other way to paint a tree, putting text and icon? Using another class instead of TreeViewer? I hope I've explained well.

Your comments will be well received.

Thank you very much.
Re: Issues about LabelProvider and TreeViewer [message #504948 is a reply to message #499162] Wed, 23 December 2009 12:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.ahoegger.ch

Hi Javier
a possible solution would be painting by yourself. You should be able to
implement it analog the table example (following the link).

http://www.eclipse.org/articles/Article-CustomDrawingTableAn dTreeItems/index.html#_tr12J

BR
Andreas



Javier wrote:
> Hi Folks:
>
> Firts of all, thanks for you help. I talk you about my problem:
>
> I'm developing a plug-in to parser a file and view the results as a
> tree, using a TreeViewer. For each leaf, I use a LabelProvider with a
> text and icon. I have a class that extends LabelProvider and here, I've
> implemented methods getText() and getImage(). I see, the icon is always
> in the first position and then the text. Is there any way to change
> that? I'd like to put the text first and icon, next.
>
> If that is not possible, is there any other way to paint a tree, putting
> text and icon? Using another class instead of TreeViewer? I hope I've
> explained well.
>
> Your comments will be well received.
>
> Thank you very much.
Re: Issues about LabelProvider and TreeViewer [message #504975 is a reply to message #504948] Wed, 23 December 2009 12:16 Go to previous messageGo to next message
Eclipse UserFriend
Use a StyledTextLabelProvider

Tom

Am 23.12.09 18:21, schrieb Andreas Hoegger:
> Hi Javier
> a possible solution would be painting by yourself. You should be able to
> implement it analog the table example (following the link).
>
> http://www.eclipse.org/articles/Article-CustomDrawingTableAn dTreeItems/index.html#_tr12J
>
>
> BR
> Andreas
>
>
>
> Javier wrote:
>> Hi Folks:
>>
>> Firts of all, thanks for you help. I talk you about my problem:
>>
>> I'm developing a plug-in to parser a file and view the results as a
>> tree, using a TreeViewer. For each leaf, I use a LabelProvider with a
>> text and icon. I have a class that extends LabelProvider and here,
>> I've implemented methods getText() and getImage(). I see, the icon is
>> always in the first position and then the text. Is there any way to
>> change that? I'd like to put the text first and icon, next.
>>
>> If that is not possible, is there any other way to paint a tree,
>> putting text and icon? Using another class instead of TreeViewer? I
>> hope I've explained well.
>>
>> Your comments will be well received.
>>
>> Thank you very much.
Re: Issues about LabelProvider and TreeViewer [message #603860 is a reply to message #504948] Wed, 23 December 2009 17:04 Go to previous message
Eclipse UserFriend
Use a StyledTextLabelProvider

Tom

Am 23.12.09 18:21, schrieb Andreas Hoegger:
> Hi Javier
> a possible solution would be painting by yourself. You should be able to
> implement it analog the table example (following the link).
>
> http://www.eclipse.org/articles/Article-CustomDrawingTableAn dTreeItems/index.html#_tr12J
>
>
> BR
> Andreas
>
>
>
> Javier wrote:
>> Hi Folks:
>>
>> Firts of all, thanks for you help. I talk you about my problem:
>>
>> I'm developing a plug-in to parser a file and view the results as a
>> tree, using a TreeViewer. For each leaf, I use a LabelProvider with a
>> text and icon. I have a class that extends LabelProvider and here,
>> I've implemented methods getText() and getImage(). I see, the icon is
>> always in the first position and then the text. Is there any way to
>> change that? I'd like to put the text first and icon, next.
>>
>> If that is not possible, is there any other way to paint a tree,
>> putting text and icon? Using another class instead of TreeViewer? I
>> hope I've explained well.
>>
>> Your comments will be well received.
>>
>> Thank you very much.
Previous Topic:Issues about LabelProvider and TreeViewer
Next Topic:Custom launcher button
Goto Forum:
  


Current Time: Thu Jul 10 07:10:36 EDT 2025

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

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

Back to the top