I have inserted one image in the tree body in one of my columns with
new TreeImagePainter(true, GUIHelper.getImage("right"), GUIHelper.getImage("right_down"), image);
in class TreeConfiguration
, but I need to add one more image beside root rows.
Moreover I need to dynamicly obtain this image from some other class, where data is already read . As it turns out i can't because either this class is null or it is called later than it should. Could you guild me how to do that.
Kind Regards
The painting of the tree structure with node icons etc. is done by the
IndentedTreeImagePainter
. TheTreeImagePainter
is used as a decorator to the base painter for the content (typically text). If you need an additional icon you need to wrap theIndentedTreeImagePainter
with anotherCellPainterDecorator
. Or in case the additional icon should be on the right of the tree icon, maybe the base painter can already be aCellPainterDecorator
that combines both, anImagePainter
and aTextPainter
.If you only want to show that icon on root nodes, you will need some more customization, probably with a custom painter.
Sorry, I don't really understand your requirement.