java.awt.datatransfer
Class  StringSelection
java.lang.Object
  |
  +--java.awt.datatransfer.StringSelection
- public class StringSelection
- extends Object
- implements Transferable, ClipboardOwner
   
A class which implements the capability required to transfer a
 simple java String in plain text format.
| 
Constructor Summary | 
StringSelection(String data)
 
          Creates a transferable object capable of transferring the
 specified string in plain text format. | 
 
 
| Methods inherited from class java.lang.Object | 
clone, 
equals, 
finalize, 
getClass, 
hashCode, 
notify, 
notifyAll, 
toString, 
wait, 
wait, 
wait | 
 
StringSelection
public StringSelection(String data)
- Creates a transferable object capable of transferring the
 specified string in plain text format.
 
getTransferDataFlavors
public DataFlavor[] getTransferDataFlavors()
- Returns the array of flavors in which it can provide the data.
- Specified by: 
 - getTransferDataFlavors in interface Transferable
 
 
 
isDataFlavorSupported
public boolean isDataFlavorSupported(DataFlavor flavor)
- Returns whether the requested flavor is supported by this object.
- Specified by: 
 - isDataFlavorSupported in interface Transferable
 - Parameters:
 flavor - the requested flavor for the data
 
 
getTransferData
public Object getTransferData(DataFlavor flavor)
                       throws UnsupportedFlavorException,
                              IOException
- If the data was requested in the "java.lang.String" flavor, return the
 String representing the selection.
- Specified by: 
 - getTransferData in interface Transferable
 - Parameters:
 flavor - the requested flavor for the data- Throws:
 - UnsupportedFlavorException - if the requested data flavor is
              not supported in the "
java.lang.String" flavor. 
 
 
lostOwnership
public void lostOwnership(Clipboard clipboard,
                          Transferable contents)
- Specified by: 
 - lostOwnership in interface ClipboardOwner
 
 
Submit a bug or feature Version 1.2 of Java Platform API Specification
Java is a trademark or registered trademark of Sun Microsystems,  Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A.  All Rights Reserved.