//provide dynamic content
options.withContent(new TooltipContentProvider() {
@Override
public String getContent(Element element) {
Integer id = Integer.parseInt(element.getAttribute("data-contact-id"));
ContactInfo contact = ContactDatabase.get().queryContactById(id);
return ContactTemplates.INSTANCE.contactCellTooltip(contactImage, contact.getFullName(),
contact.getAddress()).asString();
}
});
options.withResources(ContactTooltipResources.INSTANCE);
options.withPlacement(TooltipPlacement.RIGHT);