JHotDraw 7.4.1

org.jhotdraw.gui.datatransfer
Class AWTClipboard

java.lang.Object
  extended by java.awt.datatransfer.Clipboard
      extended by org.jhotdraw.gui.datatransfer.AbstractClipboard
          extended by org.jhotdraw.gui.datatransfer.AWTClipboard
Direct Known Subclasses:
OSXClipboard

public class AWTClipboard
extends AbstractClipboard

AWTClipboard acts as a proxy to an AWT Clipboard object.


Design Patterns

Proxy
AWTClipboard acts as a proxy to an AWT Clipboard object.
Proxy: AWTClipboard; Target: java.awt.datatransfer.Clipboard.

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

Field Summary
 
Fields inherited from class java.awt.datatransfer.Clipboard
contents, owner
 
Constructor Summary
AWTClipboard(java.awt.datatransfer.Clipboard target)
          Creates a new proxy for the specified target object.
 
Method Summary
 java.awt.datatransfer.Transferable getContents(java.lang.Object requestor)
          Returns a Transferable object representing the current contents of the clipboard.
 java.awt.datatransfer.Clipboard getTarget()
          Returns the proxy target.
 void setContents(java.awt.datatransfer.Transferable contents, java.awt.datatransfer.ClipboardOwner owner)
          Sets the current contents of the clipboard to the specified Transferable object.
 
Methods inherited from class java.awt.datatransfer.Clipboard
addFlavorListener, getAvailableDataFlavors, getData, getFlavorListeners, getName, isDataFlavorAvailable, removeFlavorListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AWTClipboard

public AWTClipboard(java.awt.datatransfer.Clipboard target)
Creates a new proxy for the specified target object.

Parameters:
target - A Clipboard object.
Method Detail

getTarget

public java.awt.datatransfer.Clipboard getTarget()
Returns the proxy target.


getContents

public java.awt.datatransfer.Transferable getContents(java.lang.Object requestor)
Description copied from class: AbstractClipboard
Returns a Transferable object representing the current contents of the clipboard. If the clipboard currently has no contents, it returns null.

Specified by:
getContents in class AbstractClipboard
Returns:
The current Transferable object on the clipboard.

setContents

public void setContents(java.awt.datatransfer.Transferable contents,
                        java.awt.datatransfer.ClipboardOwner owner)
Sets the current contents of the clipboard to the specified Transferable object.

Specified by:
setContents in class AbstractClipboard
Parameters:
contents - The Transferable object representing clipboard content.

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