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.
|
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.
- 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
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.