public interface Transferable
有关使用与Swing数据传输信息,请参阅How to Use Drag and Drop and Data Transfer ,在Java教程一节,以获取更多信息。
Modifier and Type | Method and Description |
---|---|
Object |
getTransferData(DataFlavor flavor)
返回表示要传输的数据的对象。
|
DataFlavor[] |
getTransferDataFlavors()
返回一个DataFlavor对象数组,指示可以提供数据的风格。
|
boolean |
isDataFlavorSupported(DataFlavor flavor)
返回此对象是否支持指定的数据flavor。
|
DataFlavor[] getTransferDataFlavors()
boolean isDataFlavorSupported(DataFlavor flavor)
flavor
- 要求的数据风味
Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
flavor
- 要求的数据风味
IOException
- 如果数据在请求的风味中不再可用。
UnsupportedFlavorException
- 如果不支持请求的数据风格。
DataFlavor.getRepresentationClass()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.