org.jhotdraw.gui.datatransfer
Class JNLPClipboard
- java.lang.Object
-
- java.awt.datatransfer.Clipboard
-
- org.jhotdraw.gui.datatransfer.AbstractClipboard
-
- org.jhotdraw.gui.datatransfer.JNLPClipboard
-
public class JNLPClipboard extends AbstractClipboard
JNLPClipboardacts as a proxy to a JNLPClipboardServiceobject.Uses Reflection to access the JNLP object, because JNLP is not available in J2SE 5.
Design PatternsProxy
JNLPClipboardacts as a proxy to a JNLPClipboardServiceobject.
Proxy:JNLPClipboard; Target:javax.jnlp.ClipboardService.
-
-
Constructor Summary
Constructors Constructor and Description JNLPClipboard(java.lang.Object target)Creates a new proxy for the specified target object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.awt.datatransfer.TransferablegetContents(java.lang.Object requestor)Returns aTransferableobject representing the current contents of the clipboard.java.lang.ObjectgetTarget()Returns the proxy target.voidsetContents(java.awt.datatransfer.Transferable contents, java.awt.datatransfer.ClipboardOwner owner)Sets the current contents of the clipboard to the specifiedTransferableobject.
-
-
-
Constructor Detail
-
JNLPClipboard
public JNLPClipboard(java.lang.Object target)
Creates a new proxy for the specified target object. The target object must have a getContent and a setContent method as specified by thejavax.jnlp.ClipboardServiceinterface.- Parameters:
target- A Clipboard object.
-
-
Method Detail
-
getTarget
public java.lang.Object getTarget()
Returns the proxy target.
-
getContents
public java.awt.datatransfer.Transferable getContents(java.lang.Object requestor)
Description copied from class:AbstractClipboardReturns aTransferableobject representing the current contents of the clipboard. If the clipboard currently has no contents, it returns null.- Specified by:
getContentsin classAbstractClipboard- Returns:
- The current
Transferableobject on the clipboard.
-
setContents
public void setContents(java.awt.datatransfer.Transferable contents, java.awt.datatransfer.ClipboardOwner owner)Description copied from class:AbstractClipboardSets the current contents of the clipboard to the specifiedTransferableobject.- Specified by:
setContentsin classAbstractClipboard- Parameters:
contents- TheTransferableobject representing clipboard content.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG