Class AbstarctMoxelTransfer

  • Direct Known Subclasses:
    MoxelTransferCells, MoxelTransferDrawing

    public abstract class AbstarctMoxelTransfer
    extends org.eclipse.swt.dnd.ByteArrayTransfer
    The class MoxelTransfer provides a basic platform-specific mechanism for converting both v8 spreadsheet document and v8 spreadsheet drawing represented as a java SpreadsheetDocument to a platform-specific representation of the data and vice versa.
    See Also:
    Transfer
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract int[] getTypeIds()
      Get array of available type ids
      protected abstract String[] getTypeNames()
      Get array of available type names
      void javaToNative​(Object object, org.eclipse.swt.dnd.TransferData transferData)
      This implementation of javaToNative converts Moxel Spreadsheet represented by a java SpreadsheetDocument to a platform specific representation.
      Object nativeToJava​(org.eclipse.swt.dnd.TransferData transferData)
      This implementation of nativeToJava converts a platform specific representation of moxel document to a java SpreadsheetDocument.
      protected boolean validate​(Object object)
      Validate incoming object
      • Methods inherited from class org.eclipse.swt.dnd.ByteArrayTransfer

        getSupportedTypes, isSupportedType
      • Methods inherited from class org.eclipse.swt.dnd.Transfer

        registerType
    • Constructor Detail

      • AbstarctMoxelTransfer

        public AbstarctMoxelTransfer​(org.eclipse.emf.ecore.EObject context)
        Creates new instance of AbstarctMoxelTransfer
        Parameters:
        context -
    • Method Detail

      • javaToNative

        public void javaToNative​(Object object,
                                 org.eclipse.swt.dnd.TransferData transferData)
        This implementation of javaToNative converts Moxel Spreadsheet represented by a java SpreadsheetDocument to a platform specific representation.
        Overrides:
        javaToNative in class org.eclipse.swt.dnd.ByteArrayTransfer
        Parameters:
        object - a java SpreadsheetDocument containing moxel document
        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 to a java SpreadsheetDocument.
        Overrides:
        nativeToJava in class org.eclipse.swt.dnd.ByteArrayTransfer
        Parameters:
        transferData - the platform specific representation of the data to be converted
        Returns:
        a java SpreadsheetDocument containing moxel document if the conversion was successful; otherwise null
        See Also:
        Transfer.javaToNative(java.lang.Object, org.eclipse.swt.dnd.TransferData)
      • 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
      • getTypeNames

        protected abstract 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 abstract int[] getTypeIds()
        Get array of available type ids
        Specified by:
        getTypeIds in class org.eclipse.swt.dnd.Transfer
        Returns:
        array of available type ids