com.apelon.beans.dts.plugin.transferable
Class AbstractTransferable

java.lang.Object
  extended by com.apelon.beans.dts.plugin.transferable.AbstractTransferable
All Implemented Interfaces:
Transferable
Direct Known Subclasses:
ConceptAssociationTransferable, ConceptTransferable, DTSMultiTransferable, DTSPropertyTransferable, DTSRoleTransferable, SubsetTransferable, SynonymTransferable, TermAssociationTransferable, TermTransferable

public abstract class AbstractTransferable
extends Object
implements Transferable

All transferable objects should normally extend this class. It implements getTransferDataFlavors and isDataFlavorSupported methods of Transferable interface.

Transferables extending this class should use setTransferDataFlavors to set the supporting DataFlavor for the transferable.

Copyright: Copyright (c) 2004

Company: Apelon, Inc.

Since:
3.4.0
Version:
DTS 3.4.0
Author:
Apelon Inc.

Constructor Summary
AbstractTransferable()
           
 
Method Summary
protected static DataFlavor createConstant(Class rc, String prn)
          Copied from DataFlavor class.
 DataFlavor[] getTransferDataFlavors()
          Returns an array of DataFlavor objects indicating the flavors the data can be provided in.
 boolean isDataFlavorSupported(DataFlavor flavor)
          Returns whether or not the specified data flavor is supported for this object.
 void setTransferDataFlavors(DataFlavor[] transferDataFlavors)
          Sets the DataFlavors that are supported by this Transferable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.datatransfer.Transferable
getTransferData
 

Constructor Detail

AbstractTransferable

public AbstractTransferable()
Method Detail

createConstant

protected static DataFlavor createConstant(Class rc,
                                           String prn)
Copied from DataFlavor class. Defined private there.

Parameters:
rc - representation class
prn - Human-readable String
Returns:
dataflavor, null if there is exception

setTransferDataFlavors

public void setTransferDataFlavors(DataFlavor[] transferDataFlavors)
Sets the DataFlavors that are supported by this Transferable.

Parameters:
transferDataFlavors -

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).

Specified by:
getTransferDataFlavors in interface Transferable
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.

Specified by:
isDataFlavorSupported in interface Transferable
Parameters:
flavor - the requested flavor for the data
Returns:
boolean indicating whether or not the data flavor is supported


Copyright © 2011. All Rights Reserved.