public static <NodeType extends ZyGraphNode<?>> String createTooltip(
      final AbstractZyGraph<NodeType, ?> graph, final Node node) {
    Preconditions.checkNotNull(graph, "Error: Graph argument can not be null");
    Preconditions.checkNotNull(node, "Error: Node argument can not be null");

    final IZyNodeRealizer realizer = (IZyNodeRealizer) graph.getGraph().getRealizer(node);

    if (realizer instanceof ZyProximityNodeRealizer<?>) {
      return generateProximityNodeRealizer(
          graph, (ZyProximityNode<?>) realizer.getUserData().getNode());
    }
    final ZyLabelContent content = realizer.getNodeContent();
    final boolean boldFirstLine = requiresBoldFirstLine(graph.getNode(node));

    return HtmlGenerator.getHtml(
        content, GuiHelper.getMonospacedFont().getFontName(), boldFirstLine);
  }
Creates the tooltip for a node in a graph.

@param <NodeType> Type of the nodes in the graph.
@param graph The graph the node belongs to.
@param node The node the tooltip is created for.
@return The created tooltip text.
java/zylib/src/main/java/com/google/security/zynamics/zylib/yfileswrap/gui/zygraph/helpers/TooltipGenerator.java