edu.stanford.hci.dtools.assetlibrary
Class AssetTransfer
java.lang.Object
org.eclipse.swt.dnd.Transfer
org.eclipse.swt.dnd.ByteArrayTransfer
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 )
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 |
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
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 texttransferData
- 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