Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Class java.awt.datatransfer.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.
 

Method Summary
Object  getTransferData(DataFlavor flavor)
If the data was requested in the "java.lang.String" flavor, return the String representing the selection.
DataFlavor[]  getTransferDataFlavors()
Returns the array of flavors in which it can provide the data.
boolean  isDataFlavorSupported(DataFlavor flavor)
Returns whether the requested flavor is supported by this object.
void  lostOwnership(Clipboard clipboard, Transferable contents)
 
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringSelection

public StringSelection(String data)
Creates a transferable object capable of transferring the specified string in plain text format.
Method Detail

getTransferDataFlavors

public DataFlavor[] getTransferDataFlavors()
Returns the array of flavors in which it can provide the data.
Implements:
getTransferDataFlavors in interface Transferable

isDataFlavorSupported

public boolean isDataFlavorSupported(DataFlavor flavor)
Returns whether the requested flavor is supported by this object.
Implements:
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.
Implements:
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)
Implements:
lostOwnership in interface ClipboardOwner

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
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.