Module xaos.ui

Class ClipboardUtils


  • public class ClipboardUtils
    extends Object
    Various utilities for clipboards.
    Author:
    claudio.rosati@esss.se
    • Method Detail

      • captureSnapshotAndCopyToSystemClipboard

        public static void captureSnapshotAndCopyToSystemClipboard​(Node node)
        Captures a snapshot image of the given Node and copies it into the system clipboard.
        Parameters:
        node - The node whose snapshot image must be copied in the system clipboard.
        Throws:
        NullPointerException - If node is null.
      • clearSystemClipboard

        public static void clearSystemClipboard()
        Clear the system clipboard.
      • copyToSystemClipboard

        public static void copyToSystemClipboard​(String text)
        Copy the given string into the system clipboard. The clipboard is cleared before adding the new content.
        Parameters:
        text - The string to be copied into the system clipboard.