站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

ExTransferable (NetBeans Utilities API) - NetBeans API Javadoc 5.0.0

 

org.openide.util.datatransfer
Class ExTransferable

java.lang.Object
  extended byorg.openide.util.datatransfer.ExTransferable
All Implemented Interfaces:
Transferable

public class ExTransferable
extends Object
implements Transferable

Provides additional operations on a transferable.


Nested Class Summary
static class ExTransferable.Multi
          Transferable object for multiple transfer.
static class ExTransferable.Single
          Support for transferable owner with only one data flavor.
 
Field Summary
static Transferable EMPTY
          An implementation of Transferable that contains no data.
static DataFlavor multiFlavor
          Flavor for transfer of multiple objects.
 
Method Summary
 void addTransferListener(TransferListener l)
          Adds a listener to watch the life-cycle of this object.
static ExTransferable create(Transferable t)
          Method to create a new extended transferable from a plain transferable.
 Object getTransferData(DataFlavor flavor)
           
 DataFlavor[] getTransferDataFlavors()
           
 boolean isDataFlavorSupported(DataFlavor flavor)
           
 void put(ExTransferable.Single single)
          Add a new flavor with its data.
 void remove(DataFlavor flavor)
          Remove a flavor from the supported set.
 void removeTransferListener(TransferListener l)
          Removes a listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY

public static final Transferable EMPTY
An implementation of Transferable that contains no data.


multiFlavor

public static final DataFlavor multiFlavor
Flavor for transfer of multiple objects.

Method Detail

put

public void put(ExTransferable.Single single)
Add a new flavor with its data.

Parameters:
single - the single transferable to use

remove

public void remove(DataFlavor flavor)
Remove a flavor from the supported set.

Parameters:
flavor - the flavor to remove

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

create

public static ExTransferable create(Transferable t)
Method to create a new extended transferable from a plain transferable. If the given transferable is already ExTransferable, then it is returned as is. Otherwise the data is copied.

Parameters:
t - transferable to create support for
Returns:
extended transferable

addTransferListener

public final void addTransferListener(TransferListener l)
Adds a listener to watch the life-cycle of this object.

Parameters:
l - the listener

removeTransferListener

public final void removeTransferListener(TransferListener l)
Removes a listener.


 

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