final int rowCount = attributes.getRowCount();
if (rowCount == 0) {
return null;
}
final AttributeRegistry registry = AttributeRegistry.getRegistry(node.getMap());
final TextController textController = TextController.getController(modeController);
if (registry.getAttributeViewType().equals(AttributeTableLayoutModel.SHOW_ALL)
&& ! textController.isMinimized(node)) {
return null;
}
final StringBuilder tooltip = new StringBuilder();
final int fontSize = registry.getFontSize();
tooltip.append("<html><body><table style='border: 1px black solid; background-color: black;");
tooltip.append(" font-size: "); tooltip.append(fontSize); tooltip.append("pt");
tooltip.append("' width='100%' cellspacing='1' cellpadding='2' ");
final int currentRowCount = attributes.getRowCount();
for (int i = 0; i < currentRowCount; i++) {
tooltip.append("<tr><td>");
tooltip.append(attributes.getValueAt(i, 0));
tooltip.append("</td><td>");
final Object object = attributes.getValueAt(i, 1);
final String text = getTransformedValue(node, textController, object);
if(object instanceof URI){
tooltip.append("<a");
tooltip.append(" href=\"");
tooltip.append(object);
tooltip.append("\"");
tooltip.append(">");
tooltip.append(text);
tooltip.append("</a>");
}
else{
tooltip.append(text);
}
tooltip.append("</td></tr>");
}
tooltip.append("</table></body></html>");
return tooltip.toString();
}
private String getTransformedValue(NodeModel node, final TextController textController, final Object value) {
try {
final String text = textController.getTransformedText(value, node, null);
final boolean markTransformedText = TextController.isMarkTransformedTextSet();
final String unicodeText = HtmlUtils.unicodeToHTMLUnicodeEntity(text);
if (markTransformedText && text != value)
return colorize(unicodeText, "green");
else