- java.lang.Object
-
- eu.ess.xaos.ui.util.ClipboardUtils
-
public class ClipboardUtils extends Object
Various utilities for clipboards.- Author:
- claudio.rosati@esss.se
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
captureSnapshotAndCopyToSystemClipboard(Node node)
Captures a snapshot image of the givenNode
and copies it into the system clipboard.static void
clearSystemClipboard()
Clear the system clipboard.static void
copyToSystemClipboard(String text)
Copy the given string into the system clipboard.
-
-
-
Method Detail
-
captureSnapshotAndCopyToSystemClipboard
public static void captureSnapshotAndCopyToSystemClipboard(Node node)
Captures a snapshot image of the givenNode
and copies it into the system clipboard.- Parameters:
node
- The node whose snapshot image must be copied in the system clipboard.- Throws:
NullPointerException
- Ifnode
isnull
.
-
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.
-
-