Runtime

org.eclipse.gmf.runtime.common.ui.util
Class CustomDataTransfer

java.lang.Object
  extended byorg.eclipse.swt.dnd.Transfer
      extended byorg.eclipse.swt.dnd.ByteArrayTransfer
          extended byorg.eclipse.gmf.runtime.common.ui.util.CustomDataTransfer

public final class CustomDataTransfer
extends ByteArrayTransfer

This class can be used to transfer an array of ICustomData between two parts in a workbench in a drag and drop operation or used to store/retrieve custom data to/from the system clipboard respectively.


Method Summary
static CustomDataTransfer getInstance()
          Return the singleton.
protected  int[] getTypeIds()
          Returns the type ids supported by this agent
protected  java.lang.String[] getTypeNames()
          Returns the type names supported by this agent
 void javaToNative(java.lang.Object object, TransferData transferData)
          Converts an array of ICustomData into a byte[]
 java.lang.Object nativeToJava(TransferData transferData)
          Converts a byte[] in to an array of ICustomData
 
Methods inherited from class org.eclipse.swt.dnd.ByteArrayTransfer
getSupportedTypes, isSupportedType
 
Methods inherited from class org.eclipse.swt.dnd.Transfer
registerType, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static CustomDataTransfer getInstance()
Return the singleton.

Returns:
a singleton instance of CustomDataTransfer

javaToNative

public void javaToNative(java.lang.Object object,
                         TransferData transferData)
Converts an array of ICustomData into a byte[]

See Also:
Transfer.javaToNative(java.lang.Object, org.eclipse.swt.dnd.TransferData)

nativeToJava

public java.lang.Object nativeToJava(TransferData transferData)
Converts a byte[] in to an array of ICustomData

Returns:
Object
See Also:
Transfer.nativeToJava(org.eclipse.swt.dnd.TransferData)

getTypeIds

protected int[] getTypeIds()
Returns the type ids supported by this agent

Returns:
int[]
See Also:
Transfer.getTypeIds()

getTypeNames

protected java.lang.String[] getTypeNames()
Returns the type names supported by this agent

Returns:
String[]
See Also:
Transfer.getTypeNames()

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.