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

java.lang.Object
  extended by com.apelon.beans.dts.plugin.transferable.AbstractTransferable
      extended by com.apelon.beans.dts.plugin.transferable.SubsetTransferable
All Implemented Interfaces:
Transferable

public class SubsetTransferable
extends AbstractTransferable

For transfer of Subset through Drag and Drop.

It supports these data flavors:

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

Constructor Summary
SubsetTransferable(Subset subset)
          Initializes with given Subset.
 
Method Summary
static DataFlavor getDataFlavor()
          Deprecated. Use DTSDataFlavor.subsetFlavor instead
 Object getTransferData(DataFlavor flavor)
          Returns the data for a given DataFlavor.
 void setStringValue(String stringValue)
          Sets the String value for the String data flavor if the value should be other than subset name.
 
Methods inherited from class com.apelon.beans.dts.plugin.transferable.AbstractTransferable
createConstant, getTransferDataFlavors, isDataFlavorSupported, setTransferDataFlavors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubsetTransferable

public SubsetTransferable(Subset subset)
Initializes with given Subset. The supported DataFlavors are set. The string returned for String data flavor is set the name of the subset.

Method Detail

getDataFlavor

public static DataFlavor getDataFlavor()
Deprecated. Use DTSDataFlavor.subsetFlavor instead

Returns DataFlavor of this Transferable

Returns:
java.awt.datatransfer.DataFlavor

setStringValue

public void setStringValue(String stringValue)
Sets the String value for the String data flavor if the value should be other than subset name. null value is ignored.

Parameters:
stringValue -

getTransferData

public Object getTransferData(DataFlavor flavor)
Returns the data for a given DataFlavor.

For Subset Data Flavor, the subset (Subset) of this Transferable is returned.

For String Data Flavor, the String value is retuned.

For other Data Flavor, the returned value is null

Parameters:
flavor - the requested flavor for the data
Returns:
Object


Copyright © 2011. All Rights Reserved.