java.awt.datatransfer
public class StringSelection extends Object implements Transferable, ClipboardOwner
Constructor Summary | |
---|---|
StringSelection(String data)
Transfer the specfied string as text.
|
Method Summary | |
---|---|
Object | getTransferData(DataFlavor flavor)
This method returns the data in the requested format.
|
DataFlavor[] | getTransferDataFlavors()
Returns a list of supported data flavors.
|
boolean | isDataFlavorSupported(DataFlavor flavor)
Tests whether or not the specified data flavor is supported.
|
void | lostOwnership(Clipboard clipboard, Transferable contents)
Called when ownership of the clipboard object is lost.
|
Parameters: data the data for the string selection
Parameters: flavor The desired data flavor.
Returns: The transferred data.
Throws: UnsupportedFlavorException If the specified flavor is not supported. IOException If any other error occurs.
Returns: A list of supported data flavors.
Parameters: flavor The data flavor to test.
Returns: true
if the data flavor is supported,
false
otherwise.
Parameters: clipboard The affected clipboard. contents The clipboard contents.