org.ocd.dcf.dnd
Class DCTransferObject

java.lang.Object
  |
  +--org.ocd.dcf.dnd.DCTransferObject
All Implemented Interfaces:
java.awt.datatransfer.Transferable

public class DCTransferObject
extends java.lang.Object
implements java.awt.datatransfer.Transferable

Since:
$Date: 2002/03/29 08:01:14 $
Version:
$Revision: 1.5 $
Author:
$Author: ocd_dino $, ocd_dino - ocd_dino@users.sourceforge.net (initial author)

Field Summary
static java.lang.String COMP_FLAVOR_NAME
           
static java.lang.String COMP_MIME_TYPE
           
protected  java.util.HashMap dataFlavors
           
protected static java.awt.datatransfer.DataFlavor dcComponentDataFlavor
           
 
Constructor Summary
DCTransferObject()
          Creates new TransferObject
DCTransferObject(DCComponent pComp)
          Creates new TransferObject for a Specified DCComponent
 
Method Summary
protected  void addDataFlavor(java.awt.datatransfer.DataFlavor pFlavor, java.lang.Object pData)
          Adds a Dataflavor to the Transferable
static java.awt.datatransfer.DataFlavor getDCComponentDataFlavor()
          Get the basic DCComponent DataFlavor
 java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor pFlavor)
          Gets the Transfer Data for a given DataFlavor
 java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
          Get all supported DataFlavors
 boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor pFlavor)
          Returns true if a given DataFlavor is Supported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMP_MIME_TYPE

public static final java.lang.String COMP_MIME_TYPE

COMP_FLAVOR_NAME

public static final java.lang.String COMP_FLAVOR_NAME

dcComponentDataFlavor

protected static java.awt.datatransfer.DataFlavor dcComponentDataFlavor

dataFlavors

protected java.util.HashMap dataFlavors
Constructor Detail

DCTransferObject

public DCTransferObject()
Creates new TransferObject

DCTransferObject

public DCTransferObject(DCComponent pComp)
Creates new TransferObject for a Specified DCComponent
Parameters:
pComp - Component to maintain data transfer data for
Method Detail

getTransferData

public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor pFlavor)
                                 throws java.awt.datatransfer.UnsupportedFlavorException,
                                        java.io.IOException
Gets the Transfer Data for a given DataFlavor
Specified by:
getTransferData in interface java.awt.datatransfer.Transferable
Parameters:
pFlavor - requested
Returns:
Data for the specified flavor

getTransferDataFlavors

public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Get all supported DataFlavors
Specified by:
getTransferDataFlavors in interface java.awt.datatransfer.Transferable
Returns:
array of DataFlavors

isDataFlavorSupported

public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor pFlavor)
Returns true if a given DataFlavor is Supported
Specified by:
isDataFlavorSupported in interface java.awt.datatransfer.Transferable
Returns:
boolean

addDataFlavor

protected void addDataFlavor(java.awt.datatransfer.DataFlavor pFlavor,
                             java.lang.Object pData)
Adds a Dataflavor to the Transferable
Parameters:
pFlavor - to Add
pData - for the Flavor

getDCComponentDataFlavor

public static java.awt.datatransfer.DataFlavor getDCComponentDataFlavor()
Get the basic DCComponent DataFlavor
Returns:
DataFlavor