You can wrap the tile HTML into a <div> element including title.
@Override
protected String getTileHTML(Record record) {
String tileHTML = super.getTileHTML(record);
String title = record.getAttribute("title");
return "<div title=\"" + title + "\">" + tileHTML + "<div/>";
}
This will show a tooltip when hovering over the tile. The attribute title can be set for the record as follows:
TileRecord tile = new TileRecord();
tile.setAttribute("title", "my tooltip");
@Override
protected String getTileHTML(Record record) {
String tileHTML = super.getTileHTML(record);
String title = record.getAttribute("title");
return "<div title=\"" + title + "\">" + tileHTML + "<div/>";
}
This will show a tooltip when hovering over the tile. The attribute title can be set for the record as follows:
TileRecord tile = new TileRecord();
tile.setAttribute("title", "my tooltip");
Comment