站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > 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
  extended byorg.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().


Constructor Summary
ExTransferable.Single(DataFlavor flavor)
          Constructor.
 
Method Summary
protected abstract  Object getData()
          Abstract method to override to provide the right data for this transferable.
 Object getTransferData(DataFlavor flavor)
           
 DataFlavor[] getTransferDataFlavors()
           
 boolean isDataFlavorSupported(DataFlavor flavor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExTransferable.Single

public ExTransferable.Single(DataFlavor flavor)
Constructor.

Parameters:
flavor - flavor of the data
Method Detail

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

 

Built on May 3 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.