org.eclipse.net4j.util.ui.dnd
Class DNDTransfer<TYPE>

java.lang.Object
  extended by org.eclipse.swt.dnd.Transfer
      extended by org.eclipse.swt.dnd.ByteArrayTransfer
          extended by org.eclipse.net4j.util.ui.dnd.DNDTransfer<TYPE>

public abstract class DNDTransfer<TYPE>
extends ByteArrayTransfer

Author:
Eike Stepper

Constructor Summary
protected DNDTransfer(String typeName)
           
 
Method Summary
protected  int[] getTypeIds()
          Returns the platform specific ids of the data types that can be converted using this transfer agent.
protected  String[] getTypeNames()
          Returns the platform specific names of the data types that can be converted using this transfer agent.
protected  void javaToNative(Object object, TransferData transferData)
          This implementation of javaToNative converts a java byte[] to a platform specific representation.
protected  Object nativeToJava(TransferData transferData)
          This implementation of nativeToJava converts a platform specific representation of a byte array to a java byte[].
protected abstract  TYPE readObject(ExtendedDataInputStream in)
           
protected abstract  void writeObject(ExtendedDataOutputStream out, TYPE object)
           
 
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
 

Constructor Detail

DNDTransfer

protected DNDTransfer(String typeName)
Method Detail

getTypeIds

protected int[] getTypeIds()
Description copied from class: org.eclipse.swt.dnd.Transfer
Returns the platform specific ids of the data types that can be converted using this transfer agent.

Specified by:
getTypeIds in class Transfer
Returns:
the platform specific ids of the data types that can be converted using this transfer agent

getTypeNames

protected String[] getTypeNames()
Description copied from class: org.eclipse.swt.dnd.Transfer
Returns the platform specific names of the data types that can be converted using this transfer agent.

Specified by:
getTypeNames in class Transfer
Returns:
the platform specific names of the data types that can be converted using this transfer agent.

javaToNative

protected void javaToNative(Object object,
                            TransferData transferData)
Description copied from class: org.eclipse.swt.dnd.ByteArrayTransfer
This implementation of javaToNative converts a java byte[] to a platform specific representation.

Overrides:
javaToNative in class ByteArrayTransfer
Parameters:
object - a java byte[] containing the data to be converted
transferData - an empty TransferData object that will be filled in on return with the platform specific format of the data
See Also:
Transfer.nativeToJava(org.eclipse.swt.dnd.TransferData)

nativeToJava

protected Object nativeToJava(TransferData transferData)
Description copied from class: org.eclipse.swt.dnd.ByteArrayTransfer
This implementation of nativeToJava converts a platform specific representation of a byte array to a java byte[].

Overrides:
nativeToJava in class ByteArrayTransfer
Parameters:
transferData - the platform specific representation of the data to be converted
Returns:
a java byte[] containing the converted data if the conversion was successful; otherwise null
See Also:
Transfer.javaToNative(java.lang.Object, org.eclipse.swt.dnd.TransferData)

writeObject

protected abstract void writeObject(ExtendedDataOutputStream out,
                                    TYPE object)
                             throws IOException
Throws:
IOException

readObject

protected abstract TYPE readObject(ExtendedDataInputStream in)
                            throws IOException
Throws:
IOException


Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.