need help for using decorators. [message #227671] |
Tue, 13 April 2004 10:35 |
Eclipse User |
|
|
|
Hello All,
I have a TreeViewer and a LabelProvider ( with getText() and getImage()
methods which i override) for this viewer, through which i set the icons for
indivisual items of the tree. Each item is of type "Node". I want to add
decorators to this viewer based on the status of the items in the tree. Also
whenever the status of the item (ie Node) changes the decorator on it should
update accordingly. I am using RCP. (3M8). The status of these Node is
defined by me. I have went thru the article on using decorations but i still
cannot get much from it. It asks to implement ILabelDecorator along with
extending LabelProvider. The latter i was already extending. so when i
implement the ILabelDecorator interface along with extending LabelProvider
i had to implement 2 methods namely decorateImage() and decorateText(). but
how are these two methods called . they are not being called automatically.
Any help on this, some snippets, examples etc will be greatly aprreciated. i
did found found example source code in the Article but that confussed me
further. i dont want any enablement or disablement of use of decorators thru
preference page. I just want the simple decoration functionality.
Thanks and Regards
Vishal
|
|
|
Powered by
FUDForum. Page generated in 0.03301 seconds