JHotDraw 7.4.1

org.jhotdraw.gui.datatransfer
Class ClipboardUtil

java.lang.Object
  extended by org.jhotdraw.gui.datatransfer.ClipboardUtil

public class ClipboardUtil
extends java.lang.Object

ClipboardUtil provides utility methods for the Java Clipboard API.

Version:
$Id: ClipboardUtil.java 604 2010-01-09 12:00:29Z rawcoder $
Author:
Werner Randelshofer

Constructor Summary
ClipboardUtil()
           
 
Method Summary
static java.awt.datatransfer.Clipboard getClipboard()
          Returns the ClipboardService instance.
static void setClipboard(java.awt.datatransfer.Clipboard instance)
          Sets the Clipboard singleton used by the JHotDraw framework.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClipboardUtil

public ClipboardUtil()
Method Detail

getClipboard

public static java.awt.datatransfer.Clipboard getClipboard()
Returns the ClipboardService instance. If none is set, creates a new one which tries to access the system clipboard. If this fails, an instance with a JVM local clipboard is created.

Returns:
system clipboard or a proxy.

setClipboard

public static void setClipboard(java.awt.datatransfer.Clipboard instance)
Sets the Clipboard singleton used by the JHotDraw framework.

If you set this null, the next call to getClipboard will create a new singleton.


Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.