当前页面:
在线文档首页 >
NetBeans API Javadoc 5.0.0
ExTransferable.Single (NetBeans Utilities API) - NetBeans API Javadoc 5.0.0
org.openide.util.datatransfer
Class ExTransferable.Single
java.lang.Object
org.openide.util.datatransfer.ExTransferable.Single
- All Implemented Interfaces:
- Transferable
- Enclosing class:
- ExTransferable
- public abstract static class ExTransferable.Single
- extends Object
- implements Transferable
Support for transferable owner with only one data flavor.
Subclasses need only implement getData()
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExTransferable.Single
public ExTransferable.Single(DataFlavor flavor)
- Constructor.
- Parameters:
flavor
- flavor of the data
getTransferDataFlavors
public DataFlavor[] getTransferDataFlavors()
- Specified by:
getTransferDataFlavors
in interface Transferable
isDataFlavorSupported
public boolean isDataFlavorSupported(DataFlavor flavor)
- Specified by:
isDataFlavorSupported
in interface Transferable
getTransferData
public Object getTransferData(DataFlavor flavor)
throws UnsupportedFlavorException,
IOException
- Specified by:
getTransferData
in interface Transferable
- Throws:
UnsupportedFlavorException
IOException
getData
protected abstract Object getData()
throws IOException,
UnsupportedFlavorException
- Abstract method to override to provide the right data for this
transferable.
- Returns:
- the data
- Throws:
IOException
- when an I/O error occurs
UnsupportedFlavorException
- if the flavor is not supported