This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
java.awt.datatransfer
interface Transferable
- All Known Implementing Classes:
- DropTargetContext.TransferableProxy, StringSelection
-
Most common way to construct:
-
DropTargetDropEvent dtde = …;
Transferable transferable = dtde.getTransferable();
Based on 46 examples
public interface Transferable
Defines the interface for classes that can be used to provide data
for a transfer operation.
For information on using data transfer with Swing, see
How to Use Drag and Drop and Data Transfer,
a section in The Java Tutorial, for more information.
Method Summary |
Object |
Returns an object which represents the data to be transferred.
|
DataFlavor[] |
Returns an array of DataFlavor objects indicating the flavors the data
can be provided in.
|
boolean |
Returns whether or not the specified data flavor is supported for
this object.
|
getTransferData
public Object getTransferData(DataFlavor flavor)
throws UnsupportedFlavorException,
IOException
-
Returns an object which represents the data to be transferred. The class
of the object returned is defined by the representation class of the flavor.
- Parameters:
flavor
- the requested flavor for the data
- Throws:
UnsupportedFlavorException
- if the requested data flavor is
not supported.
IOException
- if the data is no longer available
in the requested flavor.
getTransferDataFlavors
public DataFlavor[] getTransferDataFlavors()
-
Returns an array of DataFlavor objects indicating the flavors the data
can be provided in. The array should be ordered according to preference
for providing the data (from most richly descriptive to least descriptive).
- Returns:
- an array of data flavors in which this data can be transferred
isDataFlavorSupported
public boolean isDataFlavorSupported(DataFlavor flavor)
-
Returns whether or not the specified data flavor is supported for
this object.
- Parameters:
flavor
- the requested flavor for the data
- Returns:
- boolean indicating whether or not the data flavor is supported
This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
This page displays the
Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
The official Sun™ documentation can be found here at
http://java.sun.com/javase/6/docs/api/.