Vaadin n 8 Tree with custom items

Hello,

I am using Vaadin 8 Tree component. I want to add an image with the caption, but unlike the item icon. It should 2 distinct elements, image and caption. Clicking image has an associated action while caption has a different one. I tried to create custom component and add the same to the treedata. But that shows up the object address instead of image and caption. Need some help around implementing the same.