vxmlsurfer
Class TextTransfer

java.lang.Object
  extended by vxmlsurfer.TextTransfer
All Implemented Interfaces:
java.awt.datatransfer.ClipboardOwner

public class TextTransfer
extends java.lang.Object
implements java.awt.datatransfer.ClipboardOwner

Code obtained from http://www.javapractices.com/Topic82.cjp


Constructor Summary
TextTransfer()
           
 
Method Summary
 void appendClipboardContents(java.lang.String aString)
          appends a string on the clipboard
 java.lang.String getClipboardContents()
          Get the String residing on the clipboard.
 void lostOwnership(java.awt.datatransfer.Clipboard aClipboard, java.awt.datatransfer.Transferable aContents)
          Empty implementation of the ClipboardOwner interface.
 void setClipboardContents(java.lang.String aString)
          Place a String on the clipboard, and make this class the owner of the Clipboard's contents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextTransfer

public TextTransfer()
Method Detail

lostOwnership

public void lostOwnership(java.awt.datatransfer.Clipboard aClipboard,
                          java.awt.datatransfer.Transferable aContents)
Empty implementation of the ClipboardOwner interface.

Specified by:
lostOwnership in interface java.awt.datatransfer.ClipboardOwner
Parameters:
aClipboard -
aContents -

setClipboardContents

public void setClipboardContents(java.lang.String aString)
Place a String on the clipboard, and make this class the owner of the Clipboard's contents.

Parameters:
aString -

appendClipboardContents

public void appendClipboardContents(java.lang.String aString)
appends a string on the clipboard

Parameters:
aString -

getClipboardContents

public java.lang.String getClipboardContents()
Get the String residing on the clipboard.

Returns:
String any text found on the Clipboard; if none found, return an empty String.