Class java.awt.datatransfer.StringSelection
All Packages Class Hierarchy This Package Previous Next Index
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.
StringSelection(String)
Creates a transferable object capable of transferring the
specified string in plain text format.
getTransferData(DataFlavor)
If the data was requested in the "java.lang.String" flavor, return the
String representing the selection.
getTransferDataFlavors()
Returns the array of flavors in which it can provide the data.
isDataFlavorSupported(DataFlavor)
Returns whether the requested flavor is supported by this object.
lostOwnership(Clipboard, Transferable)
StringSelection
public StringSelection(String data)
Creates a transferable object capable of transferring the
specified string in plain text format.
getTransferDataFlavors
public synchronized DataFlavor[] getTransferDataFlavors()
Returns the array of flavors in which it can provide the data.
isDataFlavorSupported
public boolean isDataFlavorSupported(DataFlavor flavor)
Returns whether the requested flavor is supported by this object.
Parameters:
flavor - the requested flavor for the data
getTransferData
public synchronized Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
If the data was requested in the "java.lang.String" flavor, return the
String representing the selection.
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)
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature - Version 1.1.7 of Java Platform API Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1995-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Wyszukiwarka
Podobne podstrony:
java awt datatransfer ClipboardOwnerjava awt datatransfer Transferablejava awt datatransfer UnsupportedFlavorExceptionjava awt datatransfer DataFlavorPackage java awt datatransferjava awt datatransfer Clipboardjava awt image IndexColorModeljava awt image ImageConsumerjava awt event ActionEventjava awt event FocusEventjava awt IllegalComponentStateExceptionjava awt Labeljava awt Menujava awt image ReplicateScaleFilterjava awt Cursorjava awt Colorjava awt Toolkitjava awt event MouseMotionListenerjava awt Shapewięcej podobnych podstron