public static void copyToClipboard(final ZyGraphNode<?> node) {
    Preconditions.checkNotNull(node, "Error: Node argument can not be null");
    final IZyNodeRealizer realizer = node.getRealizer();
    final ZyLabelContent content = realizer.getNodeContent();

    if (content.isSelectable()) {
      final ZyLabelContent zyContent = content;

      final StringBuilder textBuilder = new StringBuilder();

      for (final ZyLineContent zyLineContent : zyContent) {
        textBuilder.append(zyLineContent.getText());
        textBuilder.append("\n"); // $NON-NLS-1$
      }

      ClipboardHelpers.copyToClipboard(textBuilder.toString());
    }
  }
Copies the text content of a node to the clip board.

@param node The node to copy to the clip board.
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/zygraph/helpers/ClipboardCopier.java