Class MoxelDescriptorTransfer


  • public class MoxelDescriptorTransfer
    extends org.eclipse.swt.dnd.ByteArrayTransfer
    The class MoxelDescriptorTransfer provides a platform specific mechanism for converting moxel document descriptor represented as a java MoxelDescriptor to a platform specific representation of the data and vice versa.
    See Also:
    Transfer
    • Method Detail

      • getInstance

        public static MoxelDescriptorTransfer getInstance()
        Returns the singleton instance of the MoxelDescriptorTransfer class.
        Returns:
        the singleton instance of the MoxelDescriptorTransfer class
      • javaToNative

        public void javaToNative​(Object object,
                                 org.eclipse.swt.dnd.TransferData transferData)
        This implementation of javaToNative converts descriptor of moxel document represented by a java MoxelDescriptor to a platform specific representation.
        Overrides:
        javaToNative in class org.eclipse.swt.dnd.ByteArrayTransfer
        Parameters:
        object - a java MoxelDescriptor containing moxel document descriptor
        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

        public Object nativeToJava​(org.eclipse.swt.dnd.TransferData transferData)
        This implementation of nativeToJava converts a platform specific representation of moxel document descriptor to a java UUID.
        Overrides:
        nativeToJava in class org.eclipse.swt.dnd.ByteArrayTransfer
        Parameters:
        transferData - the platform specific representation of the data to be converted
        Returns:
        a java UUID containing document uuid if the conversion was successful; otherwise null
        See Also:
        Transfer.javaToNative(java.lang.Object, org.eclipse.swt.dnd.TransferData)
      • getTypeNames

        protected String[] getTypeNames()
        Get array of available type names
        Specified by:
        getTypeNames in class org.eclipse.swt.dnd.Transfer
        Returns:
        array of available type names
      • getTypeIds

        protected int[] getTypeIds()
        Get array of available type ids
        Specified by:
        getTypeIds in class org.eclipse.swt.dnd.Transfer
        Returns:
        array of available type ids
      • validate

        protected boolean validate​(Object object)
        Validate incoming object
        Overrides:
        validate in class org.eclipse.swt.dnd.Transfer
        Parameters:
        object - - object to validate
        Returns:
        result of validation