use of org.freeplane.core.ui.components.ObjectAndIcon in project freeplane by freeplane.
the class LinkTransformer method transformContent.
public Object transformContent(Object content, MapModel map) {
if (!(content instanceof URI))
return content;
final String string = content.toString();
if (!string.startsWith("#"))
return content;
final String nodeID = string.substring(1);
final NodeModel target = map.getNodeForID(nodeID);
if (target != null) {
final String shortText = TextController.getController(modeController).getShortText(target);
final Icon icon = FrameController.localLinkIcon;
return new ObjectAndIcon(shortText, icon);
} else
return content;
}
Aggregations