edu.stanford.hci.dtools.assetlibrary
Class AssetTransfer

java.lang.Object
  extended by org.eclipse.swt.dnd.Transfer
      extended by org.eclipse.swt.dnd.ByteArrayTransfer
          extended by edu.stanford.hci.dtools.assetlibrary.AssetTransfer

public class AssetTransfer
extends org.eclipse.swt.dnd.ByteArrayTransfer

Drag and Drop transfer support class for asset library.

This software is distributed under the BSD License.

Author:
Michael Bernstein ( mbernst(AT)stanford.edu ), Bjoern Hartmann ( bjoern(AT)stanford.edu )

Field Summary
static java.lang.String IMAGE_TRANSFER
           
static java.lang.String LED_TRANSFER
           
static java.lang.String SOUND_TRANSFER
           
static java.lang.String VIDEO_TRANSFER
           
 
Method Summary
 java.lang.String getAssetType()
           
static AssetTransfer getInstance()
          Returns the singleton instance of the TextTransfer class.
 void javaToNative(java.lang.Object object, org.eclipse.swt.dnd.TransferData transferData)
          This implementation of javaToNative converts plain text represented by a java String to a platform specific representation.
 java.lang.Object nativeToJava(org.eclipse.swt.dnd.TransferData transferData)
          This implementation of nativeToJava converts a platform specific representation of plain text to a java String.
 void setAssetType(java.lang.String assetType)
           
 
Methods inherited from class org.eclipse.swt.dnd.ByteArrayTransfer
getSupportedTypes, isSupportedType
 
Methods inherited from class org.eclipse.swt.dnd.Transfer
registerType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IMAGE_TRANSFER

public static final java.lang.String IMAGE_TRANSFER
See Also:
Constant Field Values

VIDEO_TRANSFER

public static final java.lang.String VIDEO_TRANSFER
See Also:
Constant Field Values

SOUND_TRANSFER

public static final java.lang.String SOUND_TRANSFER
See Also:
Constant Field Values

LED_TRANSFER

public static final java.lang.String LED_TRANSFER
See Also:
Constant Field Values
Method Detail

getInstance

public static AssetTransfer getInstance()
Returns the singleton instance of the TextTransfer class.

Returns:
the singleton instance of the TextTransfer class

setAssetType

public void setAssetType(java.lang.String assetType)

getAssetType

public java.lang.String getAssetType()

javaToNative

public void javaToNative(java.lang.Object object,
                         org.eclipse.swt.dnd.TransferData transferData)
This implementation of javaToNative converts plain text represented by a java String to a platform specific representation. For additional information see Transfer#javaToNative.

Overrides:
javaToNative in class org.eclipse.swt.dnd.ByteArrayTransfer
Parameters:
object - a java String containing text
transferData - an empty TransferData object; this object will be filled in on return with the platform specific format of the data

nativeToJava

public java.lang.Object nativeToJava(org.eclipse.swt.dnd.TransferData transferData)
This implementation of nativeToJava converts a platform specific representation of plain text to a java String. For additional information see Transfer#nativeToJava.

Overrides:
nativeToJava in class org.eclipse.swt.dnd.ByteArrayTransfer
Parameters:
transferData - the platform specific representation of the data to be been converted
Returns:
a java String containing text if the conversion was successful; otherwise null