Search in sources :

Example 1 with ServerCutText

use of com.cloud.consoleproxy.vnc.packet.server.ServerCutText in project cloudstack by apache.

the class VncServerPacketReceiver method serverCutText.

/**
     * Handle packet with server clip-board.
     */
private void serverCutText(DataInputStream is) throws IOException {
    ServerCutText clipboardContent = new ServerCutText(is);
    StringSelection contents = new StringSelection(clipboardContent.getContent());
    Toolkit.getDefaultToolkit().getSystemClipboard().setContents(contents, null);
    s_logger.info("Server clipboard buffer: " + clipboardContent.getContent());
}
Also used : ServerCutText(com.cloud.consoleproxy.vnc.packet.server.ServerCutText) StringSelection(java.awt.datatransfer.StringSelection)

Aggregations

ServerCutText (com.cloud.consoleproxy.vnc.packet.server.ServerCutText)1 StringSelection (java.awt.datatransfer.StringSelection)1