edu.northwestern.at.utils
Class SystemClipboard

java.lang.Object
  extended by edu.northwestern.at.utils.SystemClipboard

public class SystemClipboard
extends java.lang.Object

The system clipboard.

On Mac OS X the system clipboard is evidently incapable of containing custom Java objects. This static class hacks around this deficiency by keeping a parallel private Mac OS X clipboard.


Constructor Summary
protected SystemClipboard()
          Don't allow instantiation, do allow overrides.
 
Method Summary
static java.awt.datatransfer.Transferable getContents(java.lang.Object requestor)
          Gets the contents of the system clipboard.
static void setContents(java.awt.datatransfer.Transferable contents, java.awt.datatransfer.ClipboardOwner owner)
          Sets the contents of the system clipboard.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemClipboard

protected SystemClipboard()
Don't allow instantiation, do allow overrides.

Method Detail

setContents

public static void setContents(java.awt.datatransfer.Transferable contents,
                               java.awt.datatransfer.ClipboardOwner owner)
Sets the contents of the system clipboard.

Parameters:
contents - The transferable object representing the clipboard content.
owner - The object which owns the clipboard content.

getContents

public static java.awt.datatransfer.Transferable getContents(java.lang.Object requestor)
Gets the contents of the system clipboard.

Parameters:
requestor - The object requesting the clipboard data (not used).
Returns:
The current transferable object on the clipboard.