public static void copyToClipboard(final ZyGraphNode<?> node, final int line) {
    Preconditions.checkNotNull(node, "Error: Node argument can not be null");
    final IZyNodeRealizer realizer = node.getRealizer();
    final ZyLabelContent content = realizer.getNodeContent();
    Preconditions.checkArgument(
        (line >= 0) && (line < content.getLineCount()), "Error: Line argument is out of bounds");

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

      ClipboardHelpers.copyToClipboard(zyContent.getLineContent(line).getText());
    }
  }
Copies the text of a line of a node to the clip board.

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